diff --git a/.gitignore b/.gitignore index 93a3a465..9de9901b 100644 --- a/.gitignore +++ b/.gitignore @@ -9,12 +9,13 @@ out/ output/ bin/ libs/ +doc/ .classpath .project .idea/ classes/ .metadata -.vscode .settings -*.launch \ No newline at end of file +*.launch +.vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json index a1deeb97..1b6c0dc1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,4 @@ { "commentTranslate.hover.enabled": false, - "java.compile.nullAnalysis.mode": "disabled", - "java.configuration.updateBuildConfiguration": "automatic" + "java.compile.nullAnalysis.mode": "disabled" } \ No newline at end of file diff --git a/build.gradle b/build.gradle index eaa5f824..699af0f6 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ architectury { allprojects { group = rootProject.maven_group - version = "$rootProject.minecraft_version-$rootProject.mod_version" + version = "$rootProject.minecraft_version${rootProject.release_channel != "release" ? "-$rootProject.release_channel" : ""}-$rootProject.mod_version" } subprojects { @@ -23,33 +23,25 @@ subprojects { } repositories { + maven { url = "file://${System.getProperty('user.home')}/.m2/github/modsrepo/maven" } // Local maven { url = "https://raw.githubusercontent.com/MisterJulsen/modsrepo/main/maven" } // DragonLib maven { url = "https://raw.githubusercontent.com/Fuzss/modresources/main/maven/" } // Forge Config API maven { url = "https://maven.parchmentmc.org" } // ParchmentMC maven { url = "https://maven.terraformersmc.com/" } // ModMenu + maven { url = "https://maven.tterrag.com/" } // Flywheel maven { url = "https://maven.shedaniel.me/" } // Cloth Config, REI maven { url = "https://maven.blamejared.com/" } // JEI maven { url = "https://maven.quiltmc.org/repository/release" } // Quilt Mappings maven { url = "https://api.modrinth.com/maven" } // LazyDFU - maven { url = "https://maven.terraformersmc.com/releases/" } // Mod Menu maven { url = "https://mvn.devos.one/snapshots/" } // Create, Porting Lib, Forge Tags, Milk Lib, Registrate maven { url = "https://maven.jamieswhiteshirt.com/libs-release" } // Reach Entity Attributes maven { url = "https://jitpack.io/" } // Mixin Extras, Fabric ASM - + maven { url = "https://maven.tterrag.com/" } // Flywheel maven { url = "https://cursemaven.com" content { includeGroup "curse.maven" } } - - maven { url = "https://maven.tterrag.com/" // Create Forge, Registrate Forge, Flywheel - content { - includeGroup("com.jozufozu.flywheel") - includeGroup("com.tterrag.registrate") - includeGroup("com.simibubi.create") - } - } - } dependencies { @@ -60,6 +52,36 @@ subprojects { } } + processResources { + def expandProps = [ + "version": version, + "minecraft_version": rootProject.minecraft_version, + "issues": rootProject.issues, + "source": rootProject.source, + "license": rootProject.license, + "modid": rootProject.archives_name, + "display_name": rootProject.display_name, + "homepage": rootProject.homepage, + "authors": rootProject.authors, + "description": rootProject.description, + "icon": rootProject.icon, + "discord": rootProject.discord, + "next_unsupported_minecraft_version": rootProject.next_unsupported_minecraft_version, + "dragonlib_version": "$rootProject.minecraft_version-$rootProject.dragonlib_version", + "forge_version_int": rootProject.forge_version_int, + "fabric_loader_version": rootProject.fabric_loader_version, + "java_version": rootProject.java_version, + "maven_group": rootProject.maven_group, + "create_forge_version": rootProject.create_forge_version, + "main_class_name": rootProject.main_class_name, + ] + filesMatching(['pack.mcmeta', 'fabric.mod.json', 'META-INF/mods.toml', 'createrailwaysnavigator.mixins.json']) { + expand expandProps + } + inputs.properties(expandProps) + exclude ".cache" // Remove cache from generated data + } + java { withSourcesJar() withJavadocJar() @@ -68,18 +90,6 @@ subprojects { targetCompatibility = JavaVersion.VERSION_17 } - javadoc { - options { - title = "DragNSounds API ${rootProject.release_channel}-${rootProject.mod_version}" - tags("apiNote:a:API Note:") - tags("implNote:a:Impl Note:") - tags("implSpec:a:Impl Spec:") - tags("related:a:Related:") - tags("example:a:Examples:") - tags("side:a:Valid on side:") - } - } - tasks.withType(JavaCompile).configureEach { it.options.release = 17 } diff --git a/common/build.gradle b/common/build.gradle index be3455d2..41024776 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -9,9 +9,10 @@ loom { dependencies { modImplementation "net.fabricmc:fabric-loader:$rootProject.fabric_loader_version" - modImplementation("dev.architectury:architectury:${rootProject.architectury_api_version}") - modImplementation("com.electronwill.night-config:toml:3.6.0") - modImplementation("net.minecraftforge:forgeconfigapiport-fabric:${rootProject.forge_config_api_port_version}") + modCompileOnly("dev.architectury:architectury:${rootProject.architectury_api_version}") + modCompileOnly("com.electronwill.night-config:toml:3.6.0") + modCompileOnly("net.minecraftforge:forgeconfigapiport-fabric:${rootProject.forge_config_api_port_version}") modImplementation("de.mrjulsen.mcdragonlib:dragonlib-fabric:${rootProject.minecraft_version}-${rootProject.dragonlib_version}") + modImplementation("com.simibubi.create:create-fabric-${rootProject.minecraft_version}:${rootProject.create_fabric_version}") } \ No newline at end of file diff --git a/common/src/main/java/de/mrjulsen/crn/CRNPlatformSpecific.java b/common/src/main/java/de/mrjulsen/crn/CRNPlatformSpecific.java index 5992e2f9..63411f11 100644 --- a/common/src/main/java/de/mrjulsen/crn/CRNPlatformSpecific.java +++ b/common/src/main/java/de/mrjulsen/crn/CRNPlatformSpecific.java @@ -39,7 +39,6 @@ public static void registerConfig() { throw new AssertionError(); } - @ExpectPlatform public static GlobalStation getStationFromBlockEntity(BlockEntity be) { throw new AssertionError(); diff --git a/common/src/main/java/de/mrjulsen/crn/Constants.java b/common/src/main/java/de/mrjulsen/crn/Constants.java index 89951cbf..e66fb382 100644 --- a/common/src/main/java/de/mrjulsen/crn/Constants.java +++ b/common/src/main/java/de/mrjulsen/crn/Constants.java @@ -20,6 +20,9 @@ public class Constants { public static final Component TEXT_SERVER_ERROR = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".common.server_error"); public static final Component TEXT_SEARCH = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".common.search"); public static final Component TEXT_HELP = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".common.help"); + public static final Component TEXT_COPY = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".common.copy"); + public static final Component TEXT_PASTE = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".common.paste"); + public static final Component TEXT_RESET = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".common.reset_defaults"); public static final UUID ZERO_UUID = new UUID(0, 0); public static final int[] DEFAULT_TRAIN_TYPE_COLORS = new int[] { 0xFF393939, 0xFFf0f3f5, 0xFFafb4bb, 0xFF878c96, 0xFF2a7230, 0xFF814997, 0xFF1455c0, 0xFFa9455d, 0xFF55b9e6, 0xFFffd800 }; @@ -30,6 +33,7 @@ public class Constants { public static final String GITHUB_WIKI = "https://github.com/MisterJulsen/Create-Train-Navigator/wiki/"; public static final String HELP_PAGE_ADVANCED_DISPLAYS = GITHUB_WIKI + "Advanced-Displays"; public static final String HELP_PAGE_DYNAMIC_DELAYS = GITHUB_WIKI + "Dynamic-Delays"; + public static final String HELP_PAGE_TRAIN_SEPARATION = GITHUB_WIKI + "Train-Separation"; public static final String HELP_PAGE_GLOBAL_SETTINGS = GITHUB_WIKI + "Global-Settings"; public static final String HELP_PAGE_NAVIGATION_WARNING = GITHUB_WIKI + "Navigation-Warning"; public static final String HELP_PAGE_SCHEDULE_SECTIONS = GITHUB_WIKI + "Train-Schedule-Sections"; diff --git a/common/src/main/java/de/mrjulsen/crn/CreateRailwaysNavigator.java b/common/src/main/java/de/mrjulsen/crn/CreateRailwaysNavigator.java index 4dbbe69d..0aaca184 100644 --- a/common/src/main/java/de/mrjulsen/crn/CreateRailwaysNavigator.java +++ b/common/src/main/java/de/mrjulsen/crn/CreateRailwaysNavigator.java @@ -8,7 +8,6 @@ import com.simibubi.create.foundation.item.TooltipHelper.Palette; import de.mrjulsen.crn.block.AdvancedDisplayBlock; -import de.mrjulsen.crn.client.input.ModKeys; import de.mrjulsen.crn.event.CRNClientEventsRegistryEvent; import de.mrjulsen.crn.event.CRNEventsManager; import de.mrjulsen.crn.event.ModClientEvents; @@ -72,10 +71,6 @@ public static void load() {} public static void init() { - CRNPlatformSpecific.registerConfig(); - if (Platform.getEnv() == EnvType.CLIENT) { - ModKeys.init(); - } ModBlocks.init(); ModItems.init(); ModBlockEntities.init(); @@ -93,6 +88,8 @@ public static void init() { ServerErrorPacket.class )); + CRNPlatformSpecific.registerConfig(); + ModCommonEvents.init(); if (Platform.getEnv() == EnvType.CLIENT) { ModClientEvents.init(); diff --git a/common/src/main/java/de/mrjulsen/crn/block/AbstractAdvancedDisplayBlock.java b/common/src/main/java/de/mrjulsen/crn/block/AbstractAdvancedDisplayBlock.java index 3b44a902..c53efa8f 100644 --- a/common/src/main/java/de/mrjulsen/crn/block/AbstractAdvancedDisplayBlock.java +++ b/common/src/main/java/de/mrjulsen/crn/block/AbstractAdvancedDisplayBlock.java @@ -10,10 +10,14 @@ import de.mrjulsen.crn.block.blockentity.AdvancedDisplayBlockEntity; import de.mrjulsen.crn.block.blockentity.AdvancedDisplayBlockEntity.EUpdateReason; +import de.mrjulsen.crn.block.display.properties.BasicDisplaySettings; import de.mrjulsen.crn.client.ClientWrapper; import de.mrjulsen.crn.registry.ModBlockEntities; import de.mrjulsen.mcdragonlib.data.Pair; import de.mrjulsen.mcdragonlib.data.Tripple; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.color.block.BlockColor; import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos.MutableBlockPos; import net.minecraft.core.Direction; @@ -52,6 +56,8 @@ public abstract class AbstractAdvancedDisplayBlock extends Block implements IWrenchable, IBE { + public static final int DEFAULT_DISPLAY_COLOR = 0xFF404040; + public static final DirectionProperty FACING = HorizontalDirectionalBlock.FACING; public static final BooleanProperty UP = BooleanProperty.create("up"); @@ -66,6 +72,19 @@ public AbstractAdvancedDisplayBlock(Properties properties) { .setValue(FACING, Direction.NORTH) ); } + + @Environment(EnvType.CLIENT) + public static BlockColor getDisplayColor() { + return (state, world, pos, layer) -> { + if (world.getBlockEntity(pos) instanceof AdvancedDisplayBlockEntity be) { + return be.getSettingsAs(BasicDisplaySettings.class).map(x -> { + int color = x.getBackColor(); + return color == 0 ? null : color; + }).orElse(DEFAULT_DISPLAY_COLOR); + } + return DEFAULT_DISPLAY_COLOR; + }; + } @Override public BlockState rotate(BlockState pState, Rotation pRotation) { @@ -299,7 +318,6 @@ public void onRemove(BlockState pState, Level pLevel, BlockPos pPos, BlockState @Override public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHit) { - ItemStack heldItem = pPlayer.getItemInHand(pHand); AdvancedDisplayBlockEntity blockEntity = ((AdvancedDisplayBlockEntity)pLevel.getBlockEntity(pPos)).getController(); @@ -307,9 +325,17 @@ public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Pla DyeColor dye = dyeItem.getDyeColor(); if (dye != null) { pLevel.playSound(null, pPos, SoundEvents.DYE_USE, SoundSource.BLOCKS, 1.0F, 1.0F); + int dyeColor = dye == DyeColor.ORANGE ? 0xFFFF9900 : dye.getTextColor(); + blockEntity.applyToAll(be -> { - be.setColor(dye == DyeColor.ORANGE ? 0xFF9900 : dye.getMaterialColor().col); - be.notifyUpdate(); + be.getSettingsAs(BasicDisplaySettings.class).ifPresent(x -> { + if (pPlayer.isShiftKeyDown()) { + x.setBackColor(dyeColor); + } else { + x.setFontColor(dyeColor); + } + be.notifyUpdate(); + }); }); if (pLevel.isClientSide) { diff --git a/common/src/main/java/de/mrjulsen/crn/block/TrainStationClockBlock.java b/common/src/main/java/de/mrjulsen/crn/block/TrainStationClockBlock.java index 2f2ee6e6..33e31548 100644 --- a/common/src/main/java/de/mrjulsen/crn/block/TrainStationClockBlock.java +++ b/common/src/main/java/de/mrjulsen/crn/block/TrainStationClockBlock.java @@ -83,7 +83,7 @@ public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Pla } if (pLevel.isClientSide) { - pPlayer.displayClientMessage(TextUtils.translate("gui.createrailwaysnavigator.time", TimeUtils.parseTime((int)(pLevel.getDayTime() % DragonLib.TICKS_PER_DAY + DragonLib.DAYTIME_SHIFT), ModClientConfig.TIME_FORMAT.get())), true); + pPlayer.displayClientMessage(TextUtils.translate("gui.createrailwaysnavigator.time", TimeUtils.parseTime((int)(pLevel.getDayTime() % DragonLib.ticksPerDay() + DragonLib.daytimeShift()), ModClientConfig.TIME_FORMAT.get())), true); } return InteractionResult.SUCCESS; } diff --git a/common/src/main/java/de/mrjulsen/crn/block/blockentity/AdvancedDisplayBlockEntity.java b/common/src/main/java/de/mrjulsen/crn/block/blockentity/AdvancedDisplayBlockEntity.java index 458f4f6d..9327f5f1 100644 --- a/common/src/main/java/de/mrjulsen/crn/block/blockentity/AdvancedDisplayBlockEntity.java +++ b/common/src/main/java/de/mrjulsen/crn/block/blockentity/AdvancedDisplayBlockEntity.java @@ -2,6 +2,9 @@ import java.util.ArrayList; import java.util.List; +import java.util.Optional; + +import javax.annotation.Nullable; import com.simibubi.create.content.trains.display.FlapDisplayBlock; import com.simibubi.create.content.trains.entity.CarriageContraption; @@ -11,12 +14,17 @@ import de.mrjulsen.crn.Constants; import de.mrjulsen.crn.block.AbstractAdvancedDisplayBlock; -import de.mrjulsen.crn.block.display.AdvancedDisplaySource.ETimeDisplay; +import de.mrjulsen.crn.block.properties.ETimeDisplay; +import de.mrjulsen.crn.block.display.properties.BasicDisplaySettings; +import de.mrjulsen.crn.block.display.properties.IDisplaySettings; +import de.mrjulsen.crn.block.display.properties.components.IPlatformWidthSetting; +import de.mrjulsen.crn.block.display.properties.components.ITimeDisplaySetting; +import de.mrjulsen.crn.block.display.properties.components.ITrainNameWidthSetting; import de.mrjulsen.crn.block.properties.EDisplayInfo; import de.mrjulsen.crn.block.properties.EDisplayType; import de.mrjulsen.crn.block.properties.EDisplayType.EDisplayTypeDataSource; import de.mrjulsen.crn.client.AdvancedDisplaysRegistry; -import de.mrjulsen.crn.client.AdvancedDisplaysRegistry.DisplayTypeInfo; +import de.mrjulsen.crn.client.AdvancedDisplaysRegistry.DisplayProperties; import de.mrjulsen.crn.client.AdvancedDisplaysRegistry.DisplayTypeResourceKey; import de.mrjulsen.crn.client.ber.AdvancedDisplayRenderInstance; import de.mrjulsen.crn.data.CarriageData; @@ -29,6 +37,7 @@ import de.mrjulsen.crn.registry.ModDisplayTypes; import de.mrjulsen.mcdragonlib.block.IBERInstance; import de.mrjulsen.mcdragonlib.client.ber.IBlockEntityRendererInstance; +import de.mrjulsen.mcdragonlib.config.ECachingPriority; import de.mrjulsen.mcdragonlib.data.Cache; import de.mrjulsen.mcdragonlib.data.Pair; import de.mrjulsen.mcdragonlib.data.Tripple; @@ -43,7 +52,6 @@ import net.minecraft.nbt.Tag; import net.minecraft.network.Connection; import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket; -import net.minecraft.world.item.DyeColor; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.HorizontalDirectionalBlock; @@ -55,21 +63,25 @@ public class AdvancedDisplayBlockEntity extends SmartBlockEntity implements IMultiblockBlockEntity, IContraptionBlockEntity, - IBERInstance, - IColorableBlockEntity + IBERInstance { + private static final String NBT_DISPLAY_TYPE_SETTINGS = "DisplaySettings"; + + private static final String NBT_FILTER = "Filter"; + private static final String NBT_XSIZE = "XSize"; private static final String NBT_YSIZE = "YSize"; private static final String NBT_CONTROLLER = "IsController"; - private static final String NBT_COLOR = "Color"; private static final String NBT_GLOWING = "Glowing"; - private static final String NBT_DISPLAY_TYPE_KEY = "DisplayTypeKey"; - private static final String NBT_FILTER = "Filter"; + private static final String NBT_LAST_REFRESH_TIME = "LastRefreshed"; - private static final String NBT_PLATFORM_WIDTH = "PlatformWidth"; - private static final String NBT_TRAIN_NAME_WIDTH = "TrainNameWidth"; - private static final String NBT_TIME_DISPLAY = "TimeDisplay"; private static final String NBT_TRAIN_STOPS = "TrainStops"; + + @Deprecated private static final String LEGACY_NBT_PLATFORM_WIDTH = "PlatformWidth"; + @Deprecated private static final String LEGACY_NBT_TRAIN_NAME_WIDTH = "TrainNameWidth"; + @Deprecated private static final String LEGACY_NBT_COLOR = "Color"; + @Deprecated private static final String LEGACY_NBT_TIME_DISPLAY = "TimeDisplay"; + @Deprecated private static final String LEGACY_NBT_DISPLAY_TYPE_KEY = "DisplayTypeKey"; @Deprecated private static final String LEGACY_NBT_INFO_TYPE = "InfoType"; @Deprecated private static final String LEGACY_NBT_DISPLAY_TYPE = "DisplayType"; @@ -79,6 +91,7 @@ public class AdvancedDisplayBlockEntity extends SmartBlockEntity implements private static final int REFRESH_FREQUENCY = 100; // DATA + private DisplayTypeResourceKey displayTypeId = ModDisplayTypes.TRAIN_DESTINATION_SIMPLE; private byte xSize = 1; private byte ySize = 1; private boolean isController; @@ -86,16 +99,9 @@ public class AdvancedDisplayBlockEntity extends SmartBlockEntity implements private boolean dataOrderChanged = false; private String stationNameFilter; private StationInfo stationInfo; - private byte trainNameWidth; - private byte platformWidth; - private ETimeDisplay timeDisplay = ETimeDisplay.ABS; - - // USER SETTINGS - private int color = DyeColor.WHITE.getTextColor(); private boolean glowing = false; - private DisplayTypeResourceKey displayTypeKey = ModDisplayTypes.TRAIN_DESTINATION_SIMPLE; + private IDisplaySettings displayTypeSettings = AdvancedDisplaysRegistry.createSettings(ModDisplayTypes.TRAIN_DESTINATION_SIMPLE); - // CLIENT DISPLAY ONLY - this data is not saved! private long lastRefreshedTime; private TrainDisplayData trainData = TrainDisplayData.empty(); @@ -103,7 +109,7 @@ public class AdvancedDisplayBlockEntity extends SmartBlockEntity implements // OTHER private int syncTicks = REFRESH_FREQUENCY - 1; - private final Cache> renderer = new Cache<>(() -> new AdvancedDisplayRenderInstance(this)); + private final Cache> renderer = new Cache<>(() -> new AdvancedDisplayRenderInstance(this), ECachingPriority.ALWAYS); public final Cache relativeExitDirection = new Cache<>(() -> { if (getCarriageData() == null || !getTrainData().getNextStop().isPresent() || !(getBlockState().getBlock() instanceof AbstractAdvancedDisplayBlock)) { @@ -177,18 +183,6 @@ public long getLastRefreshedTime() { return lastRefreshedTime; } - public byte getTrainNameWidth() { - return trainNameWidth; - } - - public ETimeDisplay getTimeDisplay() { - return timeDisplay; - } - - public byte getPlatformWidth() { - return platformWidth; - } - public byte getXSize() { return xSize; } @@ -209,18 +203,12 @@ public boolean isController() { return isController; } - @Override - public int getColor() { - return color; - } - - @Override public boolean isGlowing() { return glowing; } - public DisplayTypeResourceKey getDisplayTypeKey() { - return displayTypeKey; + public DisplayTypeResourceKey getDisplayType() { + return displayTypeId; } @Override @@ -261,7 +249,7 @@ public boolean isPlatformFixed() { return !stationNameFilter.contains("*"); } - public StationInfo getStationInfo2() { + public StationInfo getStationInfo() { return stationInfo; } @@ -271,21 +259,13 @@ public String getStationNameFilter() { public boolean isSingleLine() { if (getBlockState().getBlock() instanceof AbstractAdvancedDisplayBlock block) { - return block.isSingleLined() || AdvancedDisplaysRegistry.getInfo(displayTypeKey).singleLined(); + return block.isSingleLined() || AdvancedDisplaysRegistry.getProperties(displayTypeId).singleLined(); } return false; } - public DisplayTypeInfo getDisplayTypeInfo() { - return AdvancedDisplaysRegistry.getInfo(displayTypeKey); - } - - public void setColor(int color) { - this.color = color; - if (level.isClientSide) { - getRenderer().update(level, worldPosition, getBlockState(), this, EUpdateReason.LAYOUT_CHANGED); - } - + public DisplayProperties getDisplayProperties() { + return AdvancedDisplaysRegistry.getProperties(displayTypeId); } public void setGlowing(boolean glowing) { @@ -295,24 +275,30 @@ public void setGlowing(boolean glowing) { } } - - public void setDisplayTypeKey(DisplayTypeResourceKey key) { - this.displayTypeKey = key; + + /** + * Updates the display type. + * @param key The new display type key. + * @param settings Custom display settings or {@code null} for default settings. + */ + public void setDisplayType(DisplayTypeResourceKey key, @Nullable IDisplaySettings settings) { + this.displayTypeId = key; + this.displayTypeSettings = settings; if (level.isClientSide) { getRenderer().update(level, worldPosition, getBlockState(), this, EUpdateReason.LAYOUT_CHANGED); } } - public void setDepartureData(List predictions, String stationNameFilter, StationInfo staionInfo, long lastRefreshedTime, byte platformWidth, byte trainNameWidth, byte timeDisplayId) { + public void setDepartureData(List predictions, String stationNameFilter, StationInfo staionInfo, long lastRefreshedTime) { this.dataOrderChanged = dataOrderChanged || !ListUtils.compareCollections(this.predictions, predictions, StationDisplayData::equals); this.predictions = predictions; this.stationNameFilter = stationNameFilter; this.stationInfo = staionInfo; this.lastRefreshedTime = lastRefreshedTime; - this.platformWidth = platformWidth; - this.trainNameWidth = trainNameWidth; - this.timeDisplay = ETimeDisplay.getById(timeDisplayId); + //this.platformWidth = platformWidth; + //this.trainNameWidth = trainNameWidth; + //this.timeDisplay = ETimeDisplay.getById(timeDisplayId); } @@ -324,7 +310,7 @@ public boolean connectable(BlockGetter getter, BlockPos a, BlockPos b) { if (getter.getBlockEntity(a) instanceof AdvancedDisplayBlockEntity be1 && getter.getBlockEntity(b) instanceof AdvancedDisplayBlockEntity be2 && be1.getBlockState().getBlock() instanceof AbstractAdvancedDisplayBlock block1 && be2.getBlockState().getBlock() instanceof AbstractAdvancedDisplayBlock block2) { return block1 == block2 && - be1.getDisplayTypeKey().equals(be2.getDisplayTypeKey()) && + be1.getDisplayType().equals(be2.getDisplayType()) && block1.canConnectWithBlock(getter, getter.getBlockState(a), getter.getBlockState(b)) && block2.canConnectWithBlock(getter, getter.getBlockState(b), getter.getBlockState(a)) && (!a.above().equals(b) || (be1.getBlockState().getValue(AbstractAdvancedDisplayBlock.UP) && !be1.isSingleLine())) && (!a.below().equals(b) || (be1.getBlockState().getValue(AbstractAdvancedDisplayBlock.DOWN) && !be1.isSingleLine())) @@ -351,7 +337,7 @@ public AdvancedDisplayBlockEntity getController() { } BlockEntity found = level.getBlockEntity(pos); - if (found instanceof AdvancedDisplayBlockEntity flap && flap.isController) + if (found instanceof AdvancedDisplayBlockEntity flap && flap.isController()) return flap; break; @@ -364,7 +350,7 @@ public AdvancedDisplayBlockEntity getController() { } BlockEntity found = level.getBlockEntity(pos); - if (found instanceof AdvancedDisplayBlockEntity flap && flap.isController) + if (found instanceof AdvancedDisplayBlockEntity flap && flap.isController()) return flap; break; @@ -374,16 +360,16 @@ public AdvancedDisplayBlockEntity getController() { } public void copyFrom(AdvancedDisplayBlockEntity other) { - if (getColor() == other.getColor() && - getDisplayTypeKey().equals(other.getDisplayTypeKey()) && + if ( + getDisplayType().equals(other.getDisplayType()) && isGlowing() == other.isGlowing() ) { return; } - color = other.getColor(); glowing = other.isGlowing(); - displayTypeKey = other.getDisplayTypeKey(); + displayTypeId = other.getDisplayType(); + displayTypeSettings = other.getSettings(); notifyUpdate(); } @@ -392,8 +378,6 @@ public void reset() { predictions = List.of(); stationNameFilter = ""; - platformWidth = -1; - trainNameWidth = 14; xSize = 1; ySize = 1; isController = false; @@ -467,7 +451,7 @@ public void tick() { super.tick(); - if (getDisplayTypeKey().category().getSource() != EDisplayTypeDataSource.PLATFORM) { + if (getDisplayType().category().getSource() != EDisplayTypeDataSource.PLATFORM) { return; } @@ -497,13 +481,13 @@ public void contraptionTick(Level level, BlockPos pos, BlockState state, Carriag return; } - if (getDisplayTypeKey().category().getSource() != EDisplayTypeDataSource.TRAIN_INFORMATION) { + if (getDisplayType().category().getSource() != EDisplayTypeDataSource.TRAIN_INFORMATION) { return; } syncTicks++; if ((syncTicks %= 100) == 0 && level.isClientSide) { - DataAccessor.getFromServer(((CarriageContraptionEntity)carriage.entity).trainId, ModAccessorTypes.GET_TRAIN_DISPLAY_DATA, (data) -> { + DataAccessor.getFromServer(((CarriageContraptionEntity)carriage.entity).trainId, ModAccessorTypes.GET_TRAIN_DISPLAY_DATA_FROM_SERVER, (data) -> { if (data.isEmpty() && this.trainData.isEmpty()) { return; } @@ -517,20 +501,16 @@ public void contraptionTick(Level level, BlockPos pos, BlockState state, Carriag prediction.getStationEntryIndex() != data.getNextStop().get().getStationEntryIndex() || this.trainData.getNextStopExitSide() != data.getNextStopExitSide() || this.trainData.isWaitingAtStation() != data.isWaitingAtStation() - //(getInfoType() == EDisplayInfo.INFORMATIVE && getDisplayType() == EDisplayType.PASSENGER_INFORMATION && trainData.getNextStop().get().departureTicks() + lastRefreshedTime != data.getNextStop().get().departureTicks() + refreshTime) // It's not clean but it works ... for now ; } boolean outOfService = this.trainData != null && !this.trainData.getTrainData().getId().equals(Constants.ZERO_UUID) && !data.getNextStop().isPresent(); if (outOfService) { shouldUpdate = true; } - //this.lastRefreshedTime = refreshTime; this.trainData = outOfService ? TrainDisplayData.empty() : data; this.carriageData = new CarriageData(((CarriageContraptionEntity)carriage.entity).carriageIndex, carriage.getAssemblyDirection(), data.isOppositeDirection()); this.relativeExitDirection.clear(); - if (shouldUpdate) { - } getRenderer().update(level, pos, state, this, shouldUpdate ? EUpdateReason.LAYOUT_CHANGED : EUpdateReason.DATA_CHANGED); }); } @@ -541,21 +521,26 @@ protected void write(CompoundTag pTag, boolean clientPacket) { super.write(pTag, clientPacket); pTag.putByte(NBT_XSIZE, getXSize()); pTag.putByte(NBT_YSIZE, getYSize()); - pTag.putInt(NBT_COLOR, getColor()); pTag.putBoolean(NBT_CONTROLLER, isController()); - pTag.put(NBT_DISPLAY_TYPE_KEY, getDisplayTypeKey().toNbt()); pTag.putString(NBT_FILTER, getStationNameFilter()); pTag.putBoolean(NBT_GLOWING, isGlowing()); pTag.putLong(NBT_LAST_REFRESH_TIME, getLastRefreshedTime()); - pTag.putByte(NBT_PLATFORM_WIDTH, getPlatformWidth()); - pTag.putByte(NBT_TRAIN_NAME_WIDTH, getTrainNameWidth()); - pTag.putByte(NBT_TIME_DISPLAY, getTimeDisplay().getId()); - getStationInfo2().writeNbt(pTag); + //pTag.putByte(NBT_TIME_DISPLAY, getTimeDisplay().getId()); + //pTag.putInt(NBT_COLOR, getColor()); + //pTag.putByte(NBT_PLATFORM_WIDTH, getPlatformWidth()); + //pTag.putByte(NBT_TRAIN_NAME_WIDTH, getTrainNameWidth()); + + displayTypeId.toNbt(pTag); + pTag.put(NBT_DISPLAY_TYPE_SETTINGS, displayTypeSettings.serializeNbt()); + + getStationInfo().writeNbt(pTag); if (getStops() != null && !getStops().isEmpty()) { ListTag list = new ListTag(); - list.addAll(getStops().stream().map(x -> x.toNbt()).toList()); + for (StationDisplayData data : getStops()) { + list.add(data.toNbt()); + } pTag.put(NBT_TRAIN_STOPS, list); } } @@ -569,8 +554,9 @@ public void read(CompoundTag pTag, boolean clientPacket) { isController() != pTag.getBoolean(NBT_CONTROLLER) || getXSize() != pTag.getByte(NBT_XSIZE) || getYSize() != pTag.getByte(NBT_YSIZE) || - getPlatformWidth() != pTag.getByte(NBT_PLATFORM_WIDTH) || - getTrainNameWidth() != pTag.getByte(NBT_TRAIN_NAME_WIDTH) || + // TODO + //getPlatformWidth() != pTag.getByte(LEGACY_NBT_PLATFORM_WIDTH) || + //getTrainNameWidth() != pTag.getByte(LEGACY_NBT_TRAIN_NAME_WIDTH) || (getStops().isEmpty() ^ !pTag.contains(NBT_TRAIN_STOPS)) ) { updateClient = true; @@ -583,24 +569,43 @@ public void read(CompoundTag pTag, boolean clientPacket) { xSize = pTag.getByte(NBT_XSIZE); ySize = pTag.getByte(NBT_YSIZE); - if (pTag.contains(NBT_COLOR)) { - color = pTag.getInt(NBT_COLOR); - } glowing = pTag.getBoolean(NBT_GLOWING); isController = pTag.getBoolean(NBT_CONTROLLER); + + // ### Convert deprecated data if (pTag.contains(LEGACY_NBT_INFO_TYPE) && pTag.contains(LEGACY_NBT_DISPLAY_TYPE)) { - displayTypeKey = ModDisplayTypes.legacy_getKeyForType(EDisplayType.getTypeById(pTag.getInt(LEGACY_NBT_DISPLAY_TYPE)), EDisplayInfo.getTypeById(pTag.getInt(LEGACY_NBT_INFO_TYPE))); + displayTypeId = ModDisplayTypes.legacy_getKeyForType(EDisplayType.getTypeById(pTag.getInt(LEGACY_NBT_DISPLAY_TYPE)), EDisplayInfo.getTypeById(pTag.getInt(LEGACY_NBT_INFO_TYPE))); + displayTypeSettings = AdvancedDisplaysRegistry.createSettings(displayTypeId); + } else if (pTag.contains(LEGACY_NBT_DISPLAY_TYPE_KEY)) { + displayTypeId = DisplayTypeResourceKey.legacy_fromNbt(pTag.getCompound(LEGACY_NBT_DISPLAY_TYPE_KEY)); + displayTypeSettings = AdvancedDisplaysRegistry.createSettings(displayTypeId); } else { - displayTypeKey = DisplayTypeResourceKey.fromNbt(pTag.getCompound(NBT_DISPLAY_TYPE_KEY)); + displayTypeId = DisplayTypeResourceKey.fromNbt(pTag); + displayTypeSettings = AdvancedDisplaysRegistry.createSettings(displayTypeId); + displayTypeSettings.deserializeNbt(pTag.getCompound(NBT_DISPLAY_TYPE_SETTINGS)); } + + if (pTag.contains(LEGACY_NBT_COLOR)) { + getSettingsAs(BasicDisplaySettings.class).ifPresent(x -> x.setFontColor(pTag.getInt(LEGACY_NBT_COLOR))); + } + if (displayTypeId.category().getSource() == EDisplayTypeDataSource.PLATFORM) { + if (pTag.contains(LEGACY_NBT_PLATFORM_WIDTH)) { + getSettingsAs(IPlatformWidthSetting.class).ifPresent(x -> x.setPlatformWidth(pTag.getByte(LEGACY_NBT_PLATFORM_WIDTH))); + } + if (pTag.contains(LEGACY_NBT_TRAIN_NAME_WIDTH)) { + getSettingsAs(ITrainNameWidthSetting.class).ifPresent(x -> x.setTrainNameWidth(pTag.getByte(LEGACY_NBT_TRAIN_NAME_WIDTH))); + } + if (pTag.contains(LEGACY_NBT_TIME_DISPLAY)) { + getSettingsAs(ITimeDisplaySetting.class).ifPresent(x -> x.setTimeDisplay(ETimeDisplay.getById(pTag.getByte(LEGACY_NBT_TIME_DISPLAY)))); + } + } + // ### + setDepartureData( pTag.contains(NBT_TRAIN_STOPS) ? new ArrayList<>(pTag.getList(NBT_TRAIN_STOPS, Tag.TAG_COMPOUND).stream().map(x -> StationDisplayData.fromNbt((CompoundTag)x)).toList()) : new ArrayList<>(), pTag.getString(NBT_FILTER), info, - pTag.getLong(NBT_LAST_REFRESH_TIME), - pTag.getByte(NBT_PLATFORM_WIDTH), - pTag.getByte(NBT_TRAIN_NAME_WIDTH), - pTag.getByte(NBT_TIME_DISPLAY) + pTag.getLong(NBT_LAST_REFRESH_TIME) ); if (updateClient) { @@ -628,6 +633,14 @@ public IBlockEntityRendererInstance getRenderer() { return renderer.get(); } + public IDisplaySettings getSettings() { + return displayTypeSettings; + } + + public Optional getSettingsAs(Class clazz) { + return Optional.ofNullable(clazz.isInstance(getSettings()) ? clazz.cast(getSettings()) : null); + } + @Override protected AABB createRenderBoundingBox() { AABB aabb = new AABB(worldPosition); diff --git a/common/src/main/java/de/mrjulsen/crn/block/blockentity/IColorableBlockEntity.java b/common/src/main/java/de/mrjulsen/crn/block/blockentity/IColorableBlockEntity.java deleted file mode 100644 index 3bdc918a..00000000 --- a/common/src/main/java/de/mrjulsen/crn/block/blockentity/IColorableBlockEntity.java +++ /dev/null @@ -1,6 +0,0 @@ -package de.mrjulsen.crn.block.blockentity; - -public interface IColorableBlockEntity { - int getColor(); - boolean isGlowing(); -} diff --git a/common/src/main/java/de/mrjulsen/crn/block/blockentity/TrainStationClockBlockEntity.java b/common/src/main/java/de/mrjulsen/crn/block/blockentity/TrainStationClockBlockEntity.java index c6ddca2d..3b5ef407 100644 --- a/common/src/main/java/de/mrjulsen/crn/block/blockentity/TrainStationClockBlockEntity.java +++ b/common/src/main/java/de/mrjulsen/crn/block/blockentity/TrainStationClockBlockEntity.java @@ -8,18 +8,19 @@ import de.mrjulsen.crn.client.ber.TrainStationClockRenderer; import de.mrjulsen.mcdragonlib.block.IBERInstance; import de.mrjulsen.mcdragonlib.client.ber.IBlockEntityRendererInstance; +import de.mrjulsen.mcdragonlib.config.ECachingPriority; import de.mrjulsen.mcdragonlib.data.Cache; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; -public class TrainStationClockBlockEntity extends SmartBlockEntity implements IBERInstance, IColorableBlockEntity { +public class TrainStationClockBlockEntity extends SmartBlockEntity implements IBERInstance { private static final String NBT_COLOR = "Color"; private static final String NBT_GLOWING = "IsGlowing"; - private final Cache> renderer = new Cache<>(() -> new TrainStationClockRenderer(this)); + private final Cache> renderer = new Cache<>(() -> new TrainStationClockRenderer(this), ECachingPriority.ALWAYS); private int color = 0xFFFFFFFF; private boolean glowing; @@ -36,12 +37,10 @@ public IBlockEntityRendererInstance getRenderer() return renderer.get(); } - @Override public int getColor() { return color; } - @Override public boolean isGlowing() { return glowing; } diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/AdvancedDisplaySource.java b/common/src/main/java/de/mrjulsen/crn/block/display/AdvancedDisplaySource.java index 5be02f7c..d7d7fcd4 100644 --- a/common/src/main/java/de/mrjulsen/crn/block/display/AdvancedDisplaySource.java +++ b/common/src/main/java/de/mrjulsen/crn/block/display/AdvancedDisplaySource.java @@ -1,6 +1,5 @@ package de.mrjulsen.crn.block.display; -import java.util.Arrays; import java.util.List; import com.google.common.collect.ImmutableList; @@ -8,17 +7,15 @@ import com.simibubi.create.content.redstone.displayLink.source.DisplaySource; import com.simibubi.create.content.redstone.displayLink.target.DisplayTargetStats; import com.simibubi.create.content.trains.station.GlobalStation; +import com.simibubi.create.content.trains.station.StationBlockEntity; import com.simibubi.create.foundation.gui.ModularGuiLineBuilder; import com.simibubi.create.foundation.utility.Lang; import de.mrjulsen.crn.CRNPlatformSpecific; -import de.mrjulsen.crn.CreateRailwaysNavigator; -import de.mrjulsen.mcdragonlib.core.ITranslatableEnum; -import de.mrjulsen.mcdragonlib.util.TextUtils; +import de.mrjulsen.crn.block.properties.ETimeDisplay; import net.minecraft.ChatFormatting; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.MutableComponent; -import net.minecraft.util.StringRepresentable; public class AdvancedDisplaySource extends DisplaySource { @@ -78,82 +75,5 @@ public void initConfigurationWidgets(DisplayLinkContext context, ModularGuiLineB }, NBT_FILTER); return; } - - builder.addScrollInput(0, 43, (si, l) -> { - si.titled(TextUtils.translate("gui.createrailwaysnavigator.display_source.advanced_display.train_name_width")) - .addHint(TextUtils.translate("gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description")) - .withRange(0, 65) - .withShiftStep(4); - si.setState(16); - l.withSuffix("px"); - }, NBT_TRAIN_NAME_WIDTH); - - builder.addScrollInput(47, 43, (si, l) -> { - si.titled(TextUtils.translate("gui.createrailwaysnavigator.display_source.advanced_display.platform_width")) - .addHint(TextUtils.translate("gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description")) - .withRange(-1, 65) - .withShiftStep(4); - si.setState(16); - si.format((val) -> { - if (val >= 0) { - return TextUtils.text(String.valueOf(val) + "px"); - } - return TextUtils.translate("gui.createrailwaysnavigator.common.auto"); - }); - }, NBT_PLATFORM_WIDTH); - - builder.addSelectionScrollInput(47 * 2, 43, (si, l) -> { - si - .forOptions(Arrays.stream(ETimeDisplay.values()).map(x -> TextUtils.translate(x.getValueInfoTranslationKey(CreateRailwaysNavigator.MOD_ID))).toList()) - .titled(TextUtils.translate("enum.createrailwaysnavigator.time_display")) - .addHint(TextUtils.translate("enum.createrailwaysnavigator.time_display.description")) - .format((val) -> { - return TextUtils.translate(ETimeDisplay.getById(val).getValueTranslationKey(CreateRailwaysNavigator.MOD_ID)); - }) - .setState(ETimeDisplay.ABS.getId()); - }, NBT_TIME_DISPLAY_TYPE); - } - - public static enum ETimeDisplay implements StringRepresentable, ITranslatableEnum { - ABS((byte)0, "abs"), - ETA((byte)1, "eta"); - - private byte id; - private String name; - - private ETimeDisplay(byte id, String name) { - this.id = id; - this.name = name; - } - - public byte getId() { - return id; - } - - public String getName() { - return name; - } - - public static ETimeDisplay getById(int id) { - return Arrays.stream(values()).filter(x -> x.getId() == id).findFirst().orElse(ABS); - } - - @Override - public String getEnumName() { - return "time_display"; - } - - @Override - public String getEnumValueName() { - return getName(); - } - - @Override - public String getSerializedName() { - return getName(); - } - - } - -} +} \ No newline at end of file diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/AdvancedDisplayTarget.java b/common/src/main/java/de/mrjulsen/crn/block/display/AdvancedDisplayTarget.java index ac4b0efe..e71ec518 100644 --- a/common/src/main/java/de/mrjulsen/crn/block/display/AdvancedDisplayTarget.java +++ b/common/src/main/java/de/mrjulsen/crn/block/display/AdvancedDisplayTarget.java @@ -1,5 +1,6 @@ package de.mrjulsen.crn.block.display; +import java.util.ArrayList; import java.util.List; import java.util.Queue; import java.util.concurrent.ConcurrentLinkedQueue; @@ -13,6 +14,7 @@ import de.mrjulsen.crn.block.blockentity.AdvancedDisplayBlockEntity; import de.mrjulsen.crn.block.properties.EDisplayType.EDisplayTypeDataSource; import de.mrjulsen.crn.data.storage.GlobalSettings; +import de.mrjulsen.crn.data.train.TrainStop; import de.mrjulsen.crn.data.train.TrainUtils; import de.mrjulsen.crn.data.train.portable.StationDisplayData; import de.mrjulsen.crn.event.ModCommonEvents; @@ -79,35 +81,39 @@ public void acceptFlapText(int line, List> text, DisplayL return; } - String filter = context.sourceConfig().getString("Filter"); - - if (context.getTargetBlockEntity() instanceof AdvancedDisplayBlockEntity blockEntity) { + if (context.getTargetBlockEntity() instanceof AdvancedDisplayBlockEntity blockEntity && ModCommonEvents.hasServer()) { final AdvancedDisplayBlockEntity controller = blockEntity.getController(); long dayTime = context.getTargetBlockEntity().getLevel().getDayTime(); queueAdvancedDisplayWorkerTask(() -> { - if (controller != null & controller.getDisplayTypeKey().category().getSource() == EDisplayTypeDataSource.PLATFORM) { - List preds = prepare(filter, controller.getDisplayTypeInfo().platformDisplayTrainsCount().apply(controller)); + if (controller != null && controller.getDisplayType().category().getSource() == EDisplayTypeDataSource.PLATFORM) { + String filter = context.sourceConfig().getString("Filter"); + List preds = prepare(filter, controller.getDisplayProperties().platformDisplayTrainsCount().apply(controller)); controller.setDepartureData( preds, filter, GlobalSettings.getInstance().getOrCreateStationTagFor(filter).getInfoForStation(filter), - dayTime, - (byte)context.sourceConfig().getInt(AdvancedDisplaySource.NBT_PLATFORM_WIDTH), - (byte)context.sourceConfig().getInt(AdvancedDisplaySource.NBT_TRAIN_NAME_WIDTH), - context.sourceConfig().getByte(AdvancedDisplaySource.NBT_TIME_DISPLAY_TYPE) + dayTime ); - if (ModCommonEvents.hasServer()) { - ModCommonEvents.getCurrentServer().get().executeIfPossible(controller::sendData); - } + ModCommonEvents.getCurrentServer().get().executeIfPossible(controller::sendData); } }); } } public static List prepare(String filter, int maxLines) { - return TrainUtils.getDeparturesAtStationName(filter, null).stream().limit(maxLines).map(x -> StationDisplayData.of(x)).toList(); + List result = new ArrayList<>(maxLines); + + int i = 0; + for (TrainStop stop : TrainUtils.getDeparturesAtStationName(filter, null)) { + i++; + result.add(StationDisplayData.of(stop)); + if (i >= maxLines) { + break; + } + } + return result; } @Override diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/properties/AbstractDisplaySettings.java b/common/src/main/java/de/mrjulsen/crn/block/display/properties/AbstractDisplaySettings.java new file mode 100644 index 00000000..3c7f2a5f --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/block/display/properties/AbstractDisplaySettings.java @@ -0,0 +1,36 @@ +package de.mrjulsen.crn.block.display.properties; + +import de.mrjulsen.crn.client.gui.widgets.modular.GuiBuilderContext; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.nbt.CompoundTag; + +public abstract class AbstractDisplaySettings implements IDisplaySettings { + + public static final class EmptyDisplaySettings extends AbstractDisplaySettings { + + @Override + public void deserializeNbt(CompoundTag nbt) { } + + @Override + @Environment(EnvType.CLIENT) + public void buildGui(GuiBuilderContext context) { } + + @Override + public void serializeNbt(CompoundTag nbt) { } + + @Override + public void onChangeSettings(IDisplaySettings oldSettings) { } + } + + public AbstractDisplaySettings() {} + + @Override + public final CompoundTag serializeNbt() { + CompoundTag nbt = new CompoundTag(); + this.serializeNbt(nbt); + return nbt; + } + + public abstract void serializeNbt(CompoundTag nbt); +} diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/properties/AdvancedDisplaySettingsData.java b/common/src/main/java/de/mrjulsen/crn/block/display/properties/AdvancedDisplaySettingsData.java new file mode 100644 index 00000000..acd713e5 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/block/display/properties/AdvancedDisplaySettingsData.java @@ -0,0 +1,53 @@ +package de.mrjulsen.crn.block.display.properties; + +import de.mrjulsen.crn.client.AdvancedDisplaysRegistry; +import de.mrjulsen.crn.client.AdvancedDisplaysRegistry.DisplayTypeResourceKey; +import de.mrjulsen.mcdragonlib.data.INBTSerializable; +import net.minecraft.nbt.CompoundTag; + +public class AdvancedDisplaySettingsData implements INBTSerializable { + + public static final String NBT_SETTINGS = "Settings"; + public static final String NBT_DOUBLE_SIDED = "DoubleSided"; + + private IDisplaySettings settings; + private DisplayTypeResourceKey key; + private boolean doubleSided; + + public AdvancedDisplaySettingsData() {} + + public AdvancedDisplaySettingsData(DisplayTypeResourceKey key, IDisplaySettings settings, boolean doubleSided) { + this.key = key; + this.settings = settings; + this.doubleSided = doubleSided; + } + + @Override + public CompoundTag serializeNbt() { + CompoundTag nbt = new CompoundTag(); + key.toNbt(nbt); + nbt.put(NBT_SETTINGS, settings.serializeNbt()); + nbt.putBoolean(NBT_DOUBLE_SIDED, doubleSided); + return nbt; + } + + @Override + public void deserializeNbt(CompoundTag nbt) { + this.key = DisplayTypeResourceKey.fromNbt(nbt); + this.settings = AdvancedDisplaysRegistry.createSettings(key); + this.settings.deserializeNbt(nbt.getCompound(NBT_SETTINGS)); + this.doubleSided = nbt.getBoolean(NBT_DOUBLE_SIDED); + } + + public IDisplaySettings getSettings() { + return settings; + } + + public DisplayTypeResourceKey getKey() { + return key; + } + + public boolean isDoubleSided() { + return doubleSided; + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/properties/BasicDisplaySettings.java b/common/src/main/java/de/mrjulsen/crn/block/display/properties/BasicDisplaySettings.java new file mode 100644 index 00000000..30cf5ba8 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/block/display/properties/BasicDisplaySettings.java @@ -0,0 +1,60 @@ +package de.mrjulsen.crn.block.display.properties; + +import de.mrjulsen.crn.block.display.properties.components.IColorSetting; +import de.mrjulsen.crn.client.gui.widgets.modular.GuiBuilderContext; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.nbt.CompoundTag; + +/** + * General settings that all displays share. + */ +public class BasicDisplaySettings extends AbstractDisplaySettings implements IColorSetting { + + protected int fontColor = 0xFFFFFFFF; + protected int backColor = 0; + + @Override + public void deserializeNbt(CompoundTag nbt) { + if (nbt.contains(NBT_FONT_COLOR)) this.fontColor = nbt.getInt(NBT_FONT_COLOR); + if (nbt.contains(NBT_BACK_COLOR)) this.backColor = nbt.getInt(NBT_BACK_COLOR); + } + + @Override + public void serializeNbt(CompoundTag nbt) { + nbt.putInt(NBT_FONT_COLOR, fontColor); + nbt.putInt(NBT_BACK_COLOR, backColor); + } + + @Override + @Environment(EnvType.CLIENT) + public void buildGui(GuiBuilderContext context) { + this.buildColorGui(context); + } + + @Override + public int getFontColor() { + return fontColor; + } + + @Override + public void setFontColor(int fontColor) { + this.fontColor = fontColor; + } + + @Override + public int getBackColor() { + return backColor; + } + + @Override + public void setBackColor(int backColor) { + this.backColor = backColor; + } + + @Override + public void onChangeSettings(IDisplaySettings oldSettings) { + this.copyColorSetting(oldSettings); + } + +} diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/properties/DepartureBoardDisplayTableSettings.java b/common/src/main/java/de/mrjulsen/crn/block/display/properties/DepartureBoardDisplayTableSettings.java new file mode 100644 index 00000000..77d361cd --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/block/display/properties/DepartureBoardDisplayTableSettings.java @@ -0,0 +1,148 @@ +package de.mrjulsen.crn.block.display.properties; + +import de.mrjulsen.crn.block.display.properties.components.GuiBuilderWrapper; +import de.mrjulsen.crn.block.display.properties.components.IPlatformWidthSetting; +import de.mrjulsen.crn.block.display.properties.components.IShowArrivalSetting; +import de.mrjulsen.crn.block.display.properties.components.IShowLineColorSetting; +import de.mrjulsen.crn.block.display.properties.components.ITimeDisplaySetting; +import de.mrjulsen.crn.block.display.properties.components.ITrainNameWidthSetting; +import de.mrjulsen.crn.block.properties.ETimeDisplay; +import de.mrjulsen.crn.client.gui.widgets.modular.GuiBuilderContext; +import de.mrjulsen.mcdragonlib.util.MathUtils; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.nbt.CompoundTag; + +public class DepartureBoardDisplayTableSettings extends BasicDisplaySettings implements ITimeDisplaySetting, ITrainNameWidthSetting, IPlatformWidthSetting, IShowArrivalSetting, IShowLineColorSetting { + + protected static final String NBT_INFO_WIDTH = "InfoWidth"; + protected static final String NBT_STOPOVERS_WIDTH = "StopoversWidth"; + + protected ETimeDisplay timeDisplay = ETimeDisplay.ABS; + protected byte trainNameWidth = ITrainNameWidthSetting.DEFAULT_TRAIN_NAME_WIDTH; + protected byte platformWidth = ITrainNameWidthSetting.DEFAULT_TRAIN_NAME_WIDTH; + protected boolean showArrival = false; + protected boolean showLineColor = false; + protected float infoWidthPercentage = 0.25f; + protected float stopoversWidthPercentage = 0.33f; + + @Override + public void deserializeNbt(CompoundTag nbt) { + super.deserializeNbt(nbt); + if (nbt.contains(NBT_TIME_DISPLAY)) this.timeDisplay = ETimeDisplay.getById(nbt.getByte(NBT_TIME_DISPLAY)); + if (nbt.contains(NBT_TRAIN_NAME_WIDTH)) this.trainNameWidth = nbt.getByte(NBT_TRAIN_NAME_WIDTH); + if (nbt.contains(NBT_PLATFORM_WIDTH)) this.platformWidth = nbt.getByte(NBT_PLATFORM_WIDTH); + if (nbt.contains(NBT_SHOW_ARRIVAL)) this.showArrival = nbt.getBoolean(NBT_SHOW_ARRIVAL); + if (nbt.contains(NBT_SHOW_LINE_COLOR)) this.showLineColor = nbt.getBoolean(NBT_SHOW_LINE_COLOR); + if (nbt.contains(NBT_INFO_WIDTH)) this.infoWidthPercentage = MathUtils.clamp(nbt.getFloat(NBT_INFO_WIDTH), 0, 1); + if (nbt.contains(NBT_STOPOVERS_WIDTH)) this.stopoversWidthPercentage = MathUtils.clamp(nbt.getFloat(NBT_STOPOVERS_WIDTH), 0, 1); + } + + @Override + public void serializeNbt(CompoundTag nbt) { + super.serializeNbt(nbt); + nbt.putByte(NBT_TIME_DISPLAY, timeDisplay.getId()); + nbt.putByte(NBT_TRAIN_NAME_WIDTH, trainNameWidth); + nbt.putByte(NBT_PLATFORM_WIDTH, platformWidth); + nbt.putBoolean(NBT_SHOW_ARRIVAL, showArrival); + nbt.putBoolean(NBT_SHOW_LINE_COLOR, showLineColor); + nbt.putFloat(NBT_INFO_WIDTH, infoWidthPercentage); + nbt.putFloat(NBT_STOPOVERS_WIDTH, stopoversWidthPercentage); + } + + @Override + @Environment(EnvType.CLIENT) + public void buildGui(GuiBuilderContext context) { + super.buildGui(context); + this.buildTimeDisplayGui(context); + this.buildTrainNameGui(context, false, false); + this.buildPlatformWidthGui(context, false); + GuiBuilderWrapper.buildDepartureBoardTableGui(this, context); + this.buildShowArrivalGui(context); + this.buildShowLineColorGui(context); + } + + @Override + public void onChangeSettings(IDisplaySettings oldSettings) { + super.onChangeSettings(oldSettings); + copyTimeDisplaySetting(oldSettings); + copyTrainNameSetting(oldSettings); + copyPlatformWidthSetting(oldSettings); + copyShowArrivalSetting(oldSettings); + copyShowLineColorSetting(oldSettings); + } + + @Override + public ETimeDisplay getTimeDisplay() { + return timeDisplay; + } + + @Override + public void setTimeDisplay(ETimeDisplay display) { + this.timeDisplay = display; + } + + @Override + public byte getPlatformWidth() { + return platformWidth; + } + + @Override + public void setPlatformWidth(byte b) { + this.platformWidth = b; + } + + @Override + public byte getTrainNameWidth() { + return trainNameWidth; + } + + @Override + public void setTrainNameWidth(byte b) { + this.trainNameWidth = b; + } + + @Override + public boolean showArrival() { + return showArrival; + } + + @Override + public void setShowArrival(boolean b) { + this.showArrival = b; + } + + public float getInfoWidthPercentage() { + return infoWidthPercentage; + } + + public float getStopoversWidthPercentage() { + return stopoversWidthPercentage; + } + + public void setInfoWidthPercentage(float f) { + this.infoWidthPercentage = MathUtils.clamp(f, 0, 1); + } + + public void setStopoversWidthPercentage(float f) { + this.stopoversWidthPercentage = MathUtils.clamp(f, 0, 1); + } + + public void setInfoWidthPercentageInt(byte f) { + this.infoWidthPercentage = (float)MathUtils.clamp(f, 0, 100) / 100f; + } + + public void setStopoversWidthPercentageInt(byte f) { + this.stopoversWidthPercentage = (float)MathUtils.clamp(f, 0, 100) / 100f; + } + + @Override + public boolean showLineColor() { + return showLineColor; + } + + @Override + public void setShowLineColor(boolean b) { + this.showLineColor = b; + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/properties/IDisplaySettings.java b/common/src/main/java/de/mrjulsen/crn/block/display/properties/IDisplaySettings.java new file mode 100644 index 00000000..de5b8eb2 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/block/display/properties/IDisplaySettings.java @@ -0,0 +1,35 @@ +package de.mrjulsen.crn.block.display.properties; + +import de.mrjulsen.crn.client.gui.widgets.modular.GuiBuilderContext; +import de.mrjulsen.mcdragonlib.data.INBTSerializable; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.nbt.CompoundTag; + +public interface IDisplaySettings extends INBTSerializable { + + /** + * Serializes the data to NBT. + * @return A new {@code CompoundTag} containing the serialized data. + */ + CompoundTag serializeNbt(); + + /** + * Deserializes the NBT data. + * @param nbt The NBT Compound Tag. + */ + void deserializeNbt(CompoundTag nbt); + + /** + * Called when updateing the settings of the block. Can be used to transfer old settings. + * @param oldSettings The previous settings. + */ + void onChangeSettings(IDisplaySettings oldSettings); + + /** + * Called when building the "Advanced Settings" section in the Advanced Display Settings Screen. + * @param container The container of the settings. + * @param builder The builder to build the settings lines. + */ + @Environment(EnvType.CLIENT) void buildGui(GuiBuilderContext context); +} diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/properties/PassengerInformationDetailedSettings.java b/common/src/main/java/de/mrjulsen/crn/block/display/properties/PassengerInformationDetailedSettings.java new file mode 100644 index 00000000..cd74a19f --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/block/display/properties/PassengerInformationDetailedSettings.java @@ -0,0 +1,147 @@ +package de.mrjulsen.crn.block.display.properties; + +import de.mrjulsen.crn.block.display.properties.components.ICarriageIndexSetting; +import de.mrjulsen.crn.block.display.properties.components.IShowExitDirectionSetting; +import de.mrjulsen.crn.block.display.properties.components.IShowNextConnections; +import de.mrjulsen.crn.block.display.properties.components.IShowTrainStatsSetting; +import de.mrjulsen.crn.block.display.properties.components.ITimeDisplaySetting; +import de.mrjulsen.crn.block.display.properties.components.ITrainTextSetting; +import de.mrjulsen.crn.block.properties.ETimeDisplay; +import de.mrjulsen.crn.client.gui.widgets.modular.GuiBuilderContext; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.nbt.CompoundTag; + +public class PassengerInformationDetailedSettings extends BasicDisplaySettings implements + ITimeDisplaySetting, + IShowTrainStatsSetting, + IShowExitDirectionSetting, + ICarriageIndexSetting, + IShowNextConnections, + ITrainTextSetting +{ + + protected ETimeDisplay timeDisplay = ETimeDisplay.ABS; + protected boolean showStats = true; + protected boolean showExit = true; + protected boolean showConnections = true; + protected byte carriageIndexOffset = 0; + protected boolean overwriteCarriageIndex = false; + protected ETrainTextComponents trainTextComponents = ETrainTextComponents.TRAIN_NAME; + + @Override + public void deserializeNbt(CompoundTag nbt) { + super.deserializeNbt(nbt); + if (nbt.contains(NBT_TIME_DISPLAY)) this.timeDisplay = ETimeDisplay.getById(nbt.getByte(NBT_TIME_DISPLAY)); + if (nbt.contains(NBT_SHOW_STATS)) this.showStats = nbt.getBoolean(NBT_SHOW_STATS); + if (nbt.contains(NBT_SHOW_EXIT)) this.showExit = nbt.getBoolean(NBT_SHOW_EXIT); + if (nbt.contains(NBT_SHOW_CONNECTIONS)) this.showConnections = nbt.getBoolean(NBT_SHOW_CONNECTIONS); + if (nbt.contains(NBT_CARRIAGE_INDEX)) this.carriageIndexOffset = nbt.getByte(NBT_CARRIAGE_INDEX); + if (nbt.contains(NBT_OVERWRITE_CARRIAGE_INDEX)) this.overwriteCarriageIndex = nbt.getBoolean(NBT_OVERWRITE_CARRIAGE_INDEX); + if (nbt.contains(NBT_TRAIN_TEXT)) this.trainTextComponents = ETrainTextComponents.getById(nbt.getByte(NBT_TRAIN_TEXT)); + } + + @Override + public void serializeNbt(CompoundTag nbt) { + super.serializeNbt(nbt); + nbt.putByte(NBT_TIME_DISPLAY, timeDisplay.getId()); + nbt.putBoolean(NBT_SHOW_STATS, showStats); + nbt.putBoolean(NBT_SHOW_EXIT, showExit); + nbt.putBoolean(NBT_SHOW_CONNECTIONS, showConnections); + nbt.putByte(NBT_CARRIAGE_INDEX, carriageIndexOffset); + nbt.putBoolean(NBT_OVERWRITE_CARRIAGE_INDEX, overwriteCarriageIndex); + nbt.putByte(NBT_TRAIN_TEXT, trainTextComponents.getId()); + } + + @Override + @Environment(EnvType.CLIENT) + public void buildGui(GuiBuilderContext context) { + super.buildGui(context); + this.buildTimeDisplayGui(context); + this.buildShowStatsGui(context); + this.buildShowExitGui(context); + this.buildShowConnectionGui(context); + this.buildCarriageIndexGui(context); + this.buildTrainTextGui(context); + } + + @Override + public void onChangeSettings(IDisplaySettings oldSettings) { + super.onChangeSettings(oldSettings); + copyTimeDisplaySetting(oldSettings); + copyShowExitSetting(oldSettings); + copyShowStatsSetting(oldSettings); + copyShowConnectionSetting(oldSettings); + copyCarriageIndexSetting(oldSettings); + } + + @Override + public boolean showStats() { + return showStats; + } + + @Override + public void setShowStats(boolean b) { + this.showStats = b; + } + + @Override + public boolean showExit() { + return showExit; + } + + @Override + public void setShowExit(boolean b) { + this.showExit = b; + } + + @Override + public boolean showConnections() { + return showConnections; + } + + @Override + public void setShowConnection(boolean b) { + this.showConnections = b; + } + + @Override + public byte getCarriageIndex() { + return carriageIndexOffset; + } + + @Override + public boolean shouldOverwriteCarriageIndex() { + return overwriteCarriageIndex; + } + + @Override + public void setCarriageIndex(byte b) { + this.carriageIndexOffset = b; + } + + @Override + public void setOverwriteCarriageIndex(boolean b) { + this.overwriteCarriageIndex = b; + } + + @Override + public ETimeDisplay getTimeDisplay() { + return timeDisplay; + } + + @Override + public void setTimeDisplay(ETimeDisplay display) { + this.timeDisplay = display; + } + + @Override + public ETrainTextComponents getTrainTextComponents() { + return trainTextComponents; + } + + @Override + public void setTrainTextComponents(ETrainTextComponents v) { + this.trainTextComponents = v; + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/properties/PassengerInformationScrollingTextSettings.java b/common/src/main/java/de/mrjulsen/crn/block/display/properties/PassengerInformationScrollingTextSettings.java new file mode 100644 index 00000000..2a9754f2 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/block/display/properties/PassengerInformationScrollingTextSettings.java @@ -0,0 +1,91 @@ +package de.mrjulsen.crn.block.display.properties; + +import de.mrjulsen.crn.block.display.properties.components.IShowExitDirectionSetting; +import de.mrjulsen.crn.block.display.properties.components.IShowTimeAndDateSetting; +import de.mrjulsen.crn.block.display.properties.components.IShowTrainStatsSetting; +import de.mrjulsen.crn.block.display.properties.components.ITrainTextSetting; +import de.mrjulsen.crn.client.gui.widgets.modular.GuiBuilderContext; +import net.minecraft.nbt.CompoundTag; + +public class PassengerInformationScrollingTextSettings extends BasicDisplaySettings implements IShowTrainStatsSetting, IShowExitDirectionSetting, IShowTimeAndDateSetting, ITrainTextSetting { + + protected boolean showStats = true; + protected boolean showExit = true; + protected boolean showTimeAndDate = true; + protected ETrainTextComponents trainTextComponents = ETrainTextComponents.ALL; + + @Override + public void deserializeNbt(CompoundTag nbt) { + super.deserializeNbt(nbt); + if (nbt.contains(NBT_SHOW_STATS)) this.showStats = nbt.getBoolean(NBT_SHOW_STATS); + if (nbt.contains(NBT_SHOW_EXIT)) this.showExit = nbt.getBoolean(NBT_SHOW_EXIT); + if (nbt.contains(NBT_SHOW_TIME_AND_DATE)) this.showTimeAndDate = nbt.getBoolean(NBT_SHOW_TIME_AND_DATE); + if (nbt.contains(NBT_TRAIN_TEXT)) this.trainTextComponents = ETrainTextComponents.getById(nbt.getByte(NBT_TRAIN_TEXT)); + } + + @Override + public void serializeNbt(CompoundTag nbt) { + super.serializeNbt(nbt); + nbt.putBoolean(NBT_SHOW_STATS, showStats); + nbt.putBoolean(NBT_SHOW_EXIT, showExit); + nbt.putBoolean(NBT_SHOW_TIME_AND_DATE, showTimeAndDate); + nbt.putByte(NBT_TRAIN_TEXT, trainTextComponents.getId()); + } + + @Override + public void buildGui(GuiBuilderContext context) { + super.buildGui(context); + this.buildShowStatsGui(context); + this.buildShowExitGui(context); + this.buildShowTimeAndDateGui(context); + this.buildTrainTextGui(context); + } + + @Override + public void onChangeSettings(IDisplaySettings oldSettings) { + super.onChangeSettings(oldSettings); + copyShowExitSetting(oldSettings); + copyShowStatsSetting(oldSettings); + copyShowTimeAndDateSetting(oldSettings); + } + + @Override + public boolean showStats() { + return showStats; + } + + @Override + public void setShowStats(boolean b) { + this.showStats = b; + } + + @Override + public boolean showExit() { + return showExit; + } + + @Override + public void setShowExit(boolean b) { + this.showExit = b; + } + + @Override + public ETrainTextComponents getTrainTextComponents() { + return trainTextComponents; + } + + @Override + public void setTrainTextComponents(ETrainTextComponents v) { + this.trainTextComponents = v; + } + + @Override + public boolean showTimeAndDate() { + return showTimeAndDate; + } + + @Override + public void setShowTimeAndDate(boolean b) { + this.showTimeAndDate = b; + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/properties/PlatformDisplayFocusSettings.java b/common/src/main/java/de/mrjulsen/crn/block/display/properties/PlatformDisplayFocusSettings.java new file mode 100644 index 00000000..1be5e6d9 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/block/display/properties/PlatformDisplayFocusSettings.java @@ -0,0 +1,151 @@ +package de.mrjulsen.crn.block.display.properties; + +import de.mrjulsen.crn.block.display.properties.components.GuiBuilderWrapper; +import de.mrjulsen.crn.block.display.properties.components.IPlatformWidthSetting; +import de.mrjulsen.crn.block.display.properties.components.IShowArrivalSetting; +import de.mrjulsen.crn.block.display.properties.components.IShowLineColorSetting; +import de.mrjulsen.crn.block.display.properties.components.ITimeDisplaySetting; +import de.mrjulsen.crn.block.display.properties.components.ITrainNameWidthSetting; +import de.mrjulsen.crn.block.properties.ETimeDisplay; +import de.mrjulsen.crn.client.gui.widgets.modular.GuiBuilderContext; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.nbt.CompoundTag; + +public class PlatformDisplayFocusSettings extends BasicDisplaySettings implements ITimeDisplaySetting, ITrainNameWidthSetting, IPlatformWidthSetting, IShowArrivalSetting, IShowLineColorSetting { + + public static final String NBT_TRAIN_NAME_WIDTH_NEXT_STOP = "TrainNameWidthNextStop"; + public static final String NBT_PLATFORM_WIDTH_NEXT_STOP = "PlatformWidthNextStop"; + + protected ETimeDisplay timeDisplay = ETimeDisplay.ABS; + protected byte trainNameWidth = 12; + protected byte trainNameWidthNextStop = -1; + protected byte platformWidth = -1; + protected byte platformWidthNextStop = -1; + protected boolean showArrival = true; + protected boolean showTrainLineColor = false; + + @Override + public void deserializeNbt(CompoundTag nbt) { + super.deserializeNbt(nbt); + if (nbt.contains(NBT_TIME_DISPLAY)) this.timeDisplay = ETimeDisplay.getById(nbt.getByte(NBT_TIME_DISPLAY)); + if (nbt.contains(NBT_TRAIN_NAME_WIDTH)) this.trainNameWidth = nbt.getByte(NBT_TRAIN_NAME_WIDTH); + if (nbt.contains(NBT_TRAIN_NAME_WIDTH_NEXT_STOP)) this.trainNameWidthNextStop = nbt.getByte(NBT_TRAIN_NAME_WIDTH_NEXT_STOP); + if (nbt.contains(NBT_PLATFORM_WIDTH)) this.platformWidth = nbt.getByte(NBT_PLATFORM_WIDTH); + if (nbt.contains(NBT_PLATFORM_WIDTH_NEXT_STOP)) this.platformWidthNextStop = nbt.getByte(NBT_PLATFORM_WIDTH_NEXT_STOP); + if (nbt.contains(NBT_SHOW_ARRIVAL)) this.showArrival = nbt.getBoolean(NBT_SHOW_ARRIVAL); + if (nbt.contains(NBT_SHOW_LINE_COLOR)) this.showTrainLineColor = nbt.getBoolean(NBT_SHOW_LINE_COLOR); + } + + @Override + public void serializeNbt(CompoundTag nbt) { + super.serializeNbt(nbt); + nbt.putByte(NBT_TIME_DISPLAY, timeDisplay.getId()); + nbt.putByte(NBT_TRAIN_NAME_WIDTH, trainNameWidth); + nbt.putByte(NBT_TRAIN_NAME_WIDTH_NEXT_STOP, trainNameWidthNextStop); + nbt.putByte(NBT_PLATFORM_WIDTH, platformWidth); + nbt.putByte(NBT_PLATFORM_WIDTH_NEXT_STOP, platformWidthNextStop); + nbt.putBoolean(NBT_SHOW_ARRIVAL, showArrival); + nbt.putBoolean(NBT_SHOW_LINE_COLOR, showTrainLineColor); + + } + + @Override + @Environment(EnvType.CLIENT) + public void buildGui(GuiBuilderContext context) { + super.buildGui(context); + this.buildTimeDisplayGui(context); + this.buildBasicTextWidthGui(context); + GuiBuilderWrapper.buildPlatformDisplayFocusGui(this, context); + this.buildShowArrivalGui(context); + this.buildShowLineColorGui(context); + } + + @Override + public void onChangeSettings(IDisplaySettings oldSettings) { + super.onChangeSettings(oldSettings); + copyTimeDisplaySetting(oldSettings); + copyTrainNameSetting(oldSettings); + copyPlatformWidthSetting(oldSettings); + copyShowArrivalSetting(oldSettings); + copyShowLineColorSetting(oldSettings); + + if (oldSettings instanceof PlatformDisplayFocusSettings o) { + setTrainNameWidthNextStop(o.getTrainNameWidthNextStop()); + } + } + + @Override + public ETimeDisplay getTimeDisplay() { + return timeDisplay; + } + + @Override + public void setTimeDisplay(ETimeDisplay display) { + this.timeDisplay = display; + } + + @Override + public byte getPlatformWidth() { + return platformWidth; + } + + @Override + public void setPlatformWidth(byte b) { + this.platformWidth = b; + } + + public byte getPlatformWidthNextStop() { + return platformWidthNextStop; + } + + public void setPlatformWidthNextStop(byte b) { + this.platformWidthNextStop = b; + } + + @Override + public byte getTrainNameWidth() { + return trainNameWidth; + } + + @Override + public void setTrainNameWidth(byte b) { + this.trainNameWidth = b; + } + + public byte getTrainNameWidthNextStop() { + return trainNameWidthNextStop; + } + + public void setTrainNameWidthNextStop(byte b) { + this.trainNameWidthNextStop = b; + } + + @Override + public boolean showArrival() { + return showArrival; + } + + @Override + public void setShowArrival(boolean b) { + this.showArrival = b; + } + + public boolean isAutoTrainNameWidthNextStop() { + return getTrainNameWidthNextStop() < 0; + } + + public boolean isAutoPlatformWidthNextStop() { + return getPlatformWidthNextStop() < 0; + } + + @Override + public void setShowLineColor(boolean b) { + this.showTrainLineColor = b; + } + + @Override + public boolean showLineColor() { + return showTrainLineColor; + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/properties/PlatformDisplayScrollingTextSettings.java b/common/src/main/java/de/mrjulsen/crn/block/display/properties/PlatformDisplayScrollingTextSettings.java new file mode 100644 index 00000000..b807b977 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/block/display/properties/PlatformDisplayScrollingTextSettings.java @@ -0,0 +1,49 @@ +package de.mrjulsen.crn.block.display.properties; + +import de.mrjulsen.crn.block.display.properties.components.ITimeDisplaySetting; +import de.mrjulsen.crn.block.properties.ETimeDisplay; +import de.mrjulsen.crn.client.gui.widgets.modular.GuiBuilderContext; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.nbt.CompoundTag; + +public class PlatformDisplayScrollingTextSettings extends BasicDisplaySettings implements ITimeDisplaySetting { + + protected ETimeDisplay timeDisplay = ETimeDisplay.ABS; + + @Override + public void deserializeNbt(CompoundTag nbt) { + super.deserializeNbt(nbt); + if (nbt.contains(NBT_TIME_DISPLAY)) this.timeDisplay = ETimeDisplay.getById(nbt.getByte(NBT_TIME_DISPLAY)); + } + + @Override + public void serializeNbt(CompoundTag nbt) { + super.serializeNbt(nbt); + nbt.putByte(NBT_TIME_DISPLAY, timeDisplay.getId()); + } + + @Override + @Environment(EnvType.CLIENT) + public void buildGui(GuiBuilderContext context) { + super.buildGui(context); + this.buildTimeDisplayGui(context); + } + + @Override + public void onChangeSettings(IDisplaySettings oldSettings) { + super.onChangeSettings(oldSettings); + copyTimeDisplaySetting(oldSettings); + } + + @Override + public ETimeDisplay getTimeDisplay() { + return timeDisplay; + } + + @Override + public void setTimeDisplay(ETimeDisplay display) { + this.timeDisplay = display; + } + +} diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/properties/PlatformDisplayTableSettings.java b/common/src/main/java/de/mrjulsen/crn/block/display/properties/PlatformDisplayTableSettings.java new file mode 100644 index 00000000..d7d669b0 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/block/display/properties/PlatformDisplayTableSettings.java @@ -0,0 +1,112 @@ +package de.mrjulsen.crn.block.display.properties; + +import de.mrjulsen.crn.block.display.properties.components.IPlatformWidthSetting; +import de.mrjulsen.crn.block.display.properties.components.IShowArrivalSetting; +import de.mrjulsen.crn.block.display.properties.components.IShowLineColorSetting; +import de.mrjulsen.crn.block.display.properties.components.ITimeDisplaySetting; +import de.mrjulsen.crn.block.display.properties.components.ITrainNameWidthSetting; +import de.mrjulsen.crn.block.properties.ETimeDisplay; +import de.mrjulsen.crn.client.gui.widgets.modular.GuiBuilderContext; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.nbt.CompoundTag; + +public class PlatformDisplayTableSettings extends BasicDisplaySettings implements ITimeDisplaySetting, ITrainNameWidthSetting, IPlatformWidthSetting, IShowArrivalSetting, IShowLineColorSetting { + + protected ETimeDisplay timeDisplay = ETimeDisplay.ABS; + protected byte trainNameWidth = ITrainNameWidthSetting.DEFAULT_TRAIN_NAME_WIDTH; + protected byte platformWidth = -1; + protected boolean showArrival = true; + protected boolean showLineColor = false; + + @Override + public void deserializeNbt(CompoundTag nbt) { + super.deserializeNbt(nbt); + if (nbt.contains(NBT_TIME_DISPLAY)) this.timeDisplay = ETimeDisplay.getById(nbt.getByte(NBT_TIME_DISPLAY)); + if (nbt.contains(NBT_TRAIN_NAME_WIDTH)) this.trainNameWidth = nbt.getByte(NBT_TRAIN_NAME_WIDTH); + if (nbt.contains(NBT_PLATFORM_WIDTH)) this.platformWidth = nbt.getByte(NBT_PLATFORM_WIDTH); + if (nbt.contains(NBT_SHOW_ARRIVAL)) this.showArrival = nbt.getBoolean(NBT_SHOW_ARRIVAL); + if (nbt.contains(NBT_SHOW_LINE_COLOR)) this.showLineColor = nbt.getBoolean(NBT_SHOW_LINE_COLOR); + } + + @Override + public void serializeNbt(CompoundTag nbt) { + super.serializeNbt(nbt); + nbt.putByte(NBT_TIME_DISPLAY, timeDisplay.getId()); + nbt.putByte(NBT_TRAIN_NAME_WIDTH, trainNameWidth); + nbt.putByte(NBT_PLATFORM_WIDTH, platformWidth); + nbt.putBoolean(NBT_SHOW_ARRIVAL, showArrival); + nbt.putBoolean(NBT_SHOW_LINE_COLOR, showLineColor); + } + + @Override + @Environment(EnvType.CLIENT) + public void buildGui(GuiBuilderContext context) { + super.buildGui(context); + this.buildTimeDisplayGui(context); + this.buildTrainNameGui(context, true, false); + this.buildPlatformWidthGui(context, true); + this.buildShowArrivalGui(context); + this.buildShowLineColorGui(context); + } + + @Override + public void onChangeSettings(IDisplaySettings oldSettings) { + super.onChangeSettings(oldSettings); + copyTimeDisplaySetting(oldSettings); + copyTrainNameSetting(oldSettings); + copyPlatformWidthSetting(oldSettings); + copyShowArrivalSetting(oldSettings); + copyShowLineColorSetting(oldSettings); + } + + @Override + public ETimeDisplay getTimeDisplay() { + return timeDisplay; + } + + @Override + public void setTimeDisplay(ETimeDisplay display) { + this.timeDisplay = display; + } + + @Override + public byte getPlatformWidth() { + return platformWidth; + } + + @Override + public void setPlatformWidth(byte b) { + this.platformWidth = b; + } + + @Override + public byte getTrainNameWidth() { + return trainNameWidth; + } + + @Override + public void setTrainNameWidth(byte b) { + this.trainNameWidth = b; + } + + @Override + public boolean showArrival() { + return showArrival; + } + + @Override + public void setShowArrival(boolean b) { + this.showArrival = b; + } + + @Override + public boolean showLineColor() { + return showLineColor; + } + + @Override + public void setShowLineColor(boolean b) { + this.showLineColor = b; + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/properties/TrainDestinationCompactSettings.java b/common/src/main/java/de/mrjulsen/crn/block/display/properties/TrainDestinationCompactSettings.java new file mode 100644 index 00000000..eb09a059 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/block/display/properties/TrainDestinationCompactSettings.java @@ -0,0 +1,48 @@ +package de.mrjulsen.crn.block.display.properties; + +import de.mrjulsen.crn.block.display.properties.components.ITrainNameWidthSetting; +import de.mrjulsen.crn.client.gui.widgets.modular.GuiBuilderContext; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.nbt.CompoundTag; + +public class TrainDestinationCompactSettings extends BasicDisplaySettings implements ITrainNameWidthSetting { + + protected byte trainNameWidth = -1; + + @Override + public void deserializeNbt(CompoundTag nbt) { + super.deserializeNbt(nbt); + if (nbt.contains(NBT_TRAIN_NAME_WIDTH)) this.trainNameWidth = nbt.getByte(NBT_TRAIN_NAME_WIDTH); + } + + @Override + public void serializeNbt(CompoundTag nbt) { + super.serializeNbt(nbt); + nbt.putByte(NBT_TRAIN_NAME_WIDTH, trainNameWidth); + } + + @Override + @Environment(EnvType.CLIENT) + public void buildGui(GuiBuilderContext context) { + super.buildGui(context); + this.buildTrainNameGui(context, true, true); + } + + @Override + public void onChangeSettings(IDisplaySettings oldSettings) { + super.onChangeSettings(oldSettings); + copyTrainNameSetting(oldSettings); + } + + @Override + public byte getTrainNameWidth() { + return trainNameWidth; + } + + @Override + public void setTrainNameWidth(byte b) { + this.trainNameWidth = b; + } + +} diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/properties/TrainDestinationDetailedSettings.java b/common/src/main/java/de/mrjulsen/crn/block/display/properties/TrainDestinationDetailedSettings.java new file mode 100644 index 00000000..7aeccf71 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/block/display/properties/TrainDestinationDetailedSettings.java @@ -0,0 +1,61 @@ +package de.mrjulsen.crn.block.display.properties; + +import de.mrjulsen.crn.block.display.properties.components.ICarriageIndexSetting; +import de.mrjulsen.crn.client.gui.widgets.modular.GuiBuilderContext; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.nbt.CompoundTag; + +public class TrainDestinationDetailedSettings extends BasicDisplaySettings implements ICarriageIndexSetting { + + protected byte carriageIndexOffset = 0; + protected boolean overwriteCarriageIndex = false; + + @Override + public void deserializeNbt(CompoundTag nbt) { + super.deserializeNbt(nbt); + if (nbt.contains(NBT_CARRIAGE_INDEX)) this.carriageIndexOffset = nbt.getByte(NBT_CARRIAGE_INDEX); + if (nbt.contains(NBT_OVERWRITE_CARRIAGE_INDEX)) this.overwriteCarriageIndex = nbt.getBoolean(NBT_OVERWRITE_CARRIAGE_INDEX); + } + + @Override + public void serializeNbt(CompoundTag nbt) { + super.serializeNbt(nbt); + nbt.putByte(NBT_CARRIAGE_INDEX, carriageIndexOffset); + nbt.putBoolean(NBT_OVERWRITE_CARRIAGE_INDEX, overwriteCarriageIndex); + } + + @Override + @Environment(EnvType.CLIENT) + public void buildGui(GuiBuilderContext context) { + super.buildGui(context); + this.buildCarriageIndexGui(context); + } + + @Override + public void onChangeSettings(IDisplaySettings oldSettings) { + super.onChangeSettings(oldSettings); + copyCarriageIndexSetting(oldSettings); + } + + @Override + public byte getCarriageIndex() { + return carriageIndexOffset; + } + + @Override + public boolean shouldOverwriteCarriageIndex() { + return overwriteCarriageIndex; + } + + @Override + public void setCarriageIndex(byte b) { + this.carriageIndexOffset = b; + } + + @Override + public void setOverwriteCarriageIndex(boolean b) { + this.overwriteCarriageIndex = b; + } + +} diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/properties/TrainDestinationExtendedSettings.java b/common/src/main/java/de/mrjulsen/crn/block/display/properties/TrainDestinationExtendedSettings.java new file mode 100644 index 00000000..23f7bdf0 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/block/display/properties/TrainDestinationExtendedSettings.java @@ -0,0 +1,48 @@ +package de.mrjulsen.crn.block.display.properties; + +import de.mrjulsen.crn.block.display.properties.components.ITrainNameWidthSetting; +import de.mrjulsen.crn.client.gui.widgets.modular.GuiBuilderContext; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.nbt.CompoundTag; + +public class TrainDestinationExtendedSettings extends BasicDisplaySettings implements ITrainNameWidthSetting { + + protected byte trainNameWidth = -1; + + @Override + public void deserializeNbt(CompoundTag nbt) { + super.deserializeNbt(nbt); + if (nbt.contains(NBT_TRAIN_NAME_WIDTH)) this.trainNameWidth = nbt.getByte(NBT_TRAIN_NAME_WIDTH); + } + + @Override + public void serializeNbt(CompoundTag nbt) { + super.serializeNbt(nbt); + nbt.putByte(NBT_TRAIN_NAME_WIDTH, trainNameWidth); + } + + @Override + @Environment(EnvType.CLIENT) + public void buildGui(GuiBuilderContext context) { + super.buildGui(context); + this.buildTrainNameGui(context, true, true); + } + + @Override + public void onChangeSettings(IDisplaySettings oldSettings) { + super.onChangeSettings(oldSettings); + copyTrainNameSetting(oldSettings); + } + + @Override + public byte getTrainNameWidth() { + return trainNameWidth; + } + + @Override + public void setTrainNameWidth(byte b) { + this.trainNameWidth = b; + } + +} diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/GuiBuilderWrapper.java b/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/GuiBuilderWrapper.java new file mode 100644 index 00000000..d33dafc5 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/GuiBuilderWrapper.java @@ -0,0 +1,372 @@ +package de.mrjulsen.crn.block.display.properties.components; + +import java.util.Arrays; +import java.util.List; + +import com.simibubi.create.foundation.gui.widget.ScrollInput; + +import de.mrjulsen.crn.CreateRailwaysNavigator; +import de.mrjulsen.crn.block.display.properties.DepartureBoardDisplayTableSettings; +import de.mrjulsen.crn.block.display.properties.PlatformDisplayFocusSettings; +import de.mrjulsen.crn.block.display.properties.components.ITrainTextSetting.ETrainTextComponents; +import de.mrjulsen.crn.block.properties.ETimeDisplay; +import de.mrjulsen.crn.client.gui.ModGuiIcons; +import de.mrjulsen.crn.client.gui.widgets.ColorSlotWidget; +import de.mrjulsen.crn.client.gui.widgets.DLCreateScrollInput; +import de.mrjulsen.crn.client.gui.widgets.DLCreateSelectionScrollInput; +import de.mrjulsen.crn.client.gui.widgets.IconSlotWidget; +import de.mrjulsen.crn.client.gui.widgets.modular.GuiBuilderContext; +import de.mrjulsen.crn.util.ModUtils; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLCheckBox; +import de.mrjulsen.mcdragonlib.client.util.Graphics; +import de.mrjulsen.mcdragonlib.client.util.GuiUtils; +import de.mrjulsen.mcdragonlib.data.Single.MutableSingle; +import de.mrjulsen.mcdragonlib.util.DLUtils; +import de.mrjulsen.mcdragonlib.util.MathUtils; +import de.mrjulsen.mcdragonlib.util.TextUtils; + +public class GuiBuilderWrapper { + + static void buildColorGui(IColorSetting setting, GuiBuilderContext context) { + context.builder().addLine(IColorSetting.GUI_LINE_COLORS_NAME, (line) -> { + line.add(new IconSlotWidget(line.getCurrentX(), line.y() + 2, ModGuiIcons.COLOR_PALETTE.getAsSprite(16, 16))); + line.add(new ColorSlotWidget( + context.container().getParentScreen(), + line.getCurrentX() + 4, + line.y() + 2, + setting.getFontColor() == 0 ? 0 : (0xFF << 24) | (setting.getFontColor() & 0x00FFFFFF), + ModUtils.getDyeColors(), + false, + false, + List.of(IColorSetting.textFontColor, IColorSetting.textClickToEdit), + () -> 0, + (b) -> setting.setFontColor(b.getSelectedColor()) + )); + line.add(new ColorSlotWidget( + context.container().getParentScreen(), + line.getCurrentX() + 4, + line.y() + 2, + setting.getBackColor() == 0 ? 0 : (0xFF << 24) | (setting.getBackColor() & 0x00FFFFFF), + ModUtils.getDyeColors(), + false, + true, + List.of(IColorSetting.textBackColor, IColorSetting.textClickToEdit), + () -> 0, + (b) -> setting.setBackColor(b.getSelectedColor()) + )); + }); + } + + static void buildCarriageIndexGui(ICarriageIndexSetting setting, GuiBuilderContext context) { + context.builder().addLine(ICarriageIndexSetting.GUI_LINE_CARRIAGE_INDEX_NAME, (line) -> { + line.add(new IconSlotWidget(line.getCurrentX(), line.y() + 2, ModGuiIcons.CARRIAGE_NUMBER.getAsSprite(16, 16))); + int w = 22; + line.add(new DLCreateScrollInput(context.container().getParentScreen(), line.getCurrentX() + 6, line.y() + 2, w, 18)) + .setRenderArrow(true) + .titled(TextUtils.translate("gui.createrailwaysnavigator.advanced_display_settings.carriage_index")) + .addHint(TextUtils.translate("gui.createrailwaysnavigator.advanced_display_settings.carriage_index.description")) + .withRange(0, 100) + .withShiftStep(4) + .setState(setting.getCarriageIndex()) + .calling((i) -> { + setting.setCarriageIndex(i.byteValue()); + }) + ; + line.add(new DLCheckBox(line.getCurrentX() + 4, line.y() + line.height() / 2 - 8, line.getRemainingWidth(), ICarriageIndexSetting.textOverwriteCarriageIndex.getString(), setting.shouldOverwriteCarriageIndex(), (c) -> setting.setOverwriteCarriageIndex(c.isChecked())) { + @Override + public void renderFrontLayer(Graphics graphics, int mouseX, int mouseY, float partialTicks) { + super.renderFrontLayer(graphics, mouseX, mouseY, partialTicks); + if (!isMouseSelected()) { + return; + } + GuiUtils.renderTooltip(context.container().getParentScreen(), this, List.of(ICarriageIndexSetting.textOverwriteCarriageIndexDescription), context.container().getParentScreen().width() / 3, graphics, mouseX, mouseY); + } + }); + }); + } + + static void buildBasicTextWidthGui(ICustomTextWidthSetting setting, GuiBuilderContext context) { + context.builder().addLine(ICustomTextWidthSetting.GUI_LINE_TEXT_SIZE_NAME, (line) -> { + line.add(new IconSlotWidget(line.getCurrentX(), line.y() + 2, ModGuiIcons.WIDTH.getAsSprite(16, 16))); + }); + } + + static void buildPlatformWidthGui(IPlatformWidthSetting setting, GuiBuilderContext context, boolean allowAuto) { + context.builder().addToLine(IPlatformWidthSetting.GUI_LINE_TEXT_SIZE_NAME, (line) -> { + int w = (line.getWidth() - IPlatformWidthSetting.USED_LINE_SPACE) / 4 - 3; + line.add(new DLCreateScrollInput(context.container().getParentScreen(), line.getCurrentX() + 4, line.y() + 2, w, 18)) + .titled(TextUtils.translate("gui.createrailwaysnavigator.display_source.advanced_display.platform_width")) + .addHint(TextUtils.translate("gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description")) + .withRange(allowAuto ? -1 : 0, 65) + .withShiftStep(4) + .setState(setting.getPlatformWidth()) + .format((val) -> { + if (val >= 0) { + return TextUtils.text(String.valueOf(val) + "px"); + } + return TextUtils.translate("gui.createrailwaysnavigator.common.auto"); + }) + .calling((i) -> { + setting.setPlatformWidth(i.byteValue()); + }) + ; + }); + } + + static void buildShowArrivalGui(IShowArrivalSetting setting, GuiBuilderContext context) { + context.builder().addLine(IShowArrivalSetting.GUI_LINE_SHOW_ARRIVAL_NAME, (line) -> { + line.add(new IconSlotWidget(line.getCurrentX(), line.y() + 2, ModGuiIcons.TARGET.getAsSprite(16, 16))); + line.add(new DLCheckBox(line.getCurrentX() + 4, line.y() + line.height() / 2 - 8, line.getRemainingWidth(), IShowArrivalSetting.textShowArrival.getString(), setting.showArrival(), (cb) -> setting.setShowArrival(cb.isChecked())) { + @Override + public void renderFrontLayer(Graphics graphics, int mouseX, int mouseY, float partialTicks) { + super.renderFrontLayer(graphics, mouseX, mouseY, partialTicks); + if (!isMouseSelected()) { + return; + } + GuiUtils.renderTooltip(context.container().getParentScreen(), this, List.of(IShowArrivalSetting.textShowArrivalDescription), context.container().getParentScreen().width() / 3, graphics, mouseX, mouseY); + } + }); + }); + } + + static void buildShowExitGui(IShowExitDirectionSetting settings, GuiBuilderContext context) { + context.builder().addLine(IShowExitDirectionSetting.GUI_LINE_SHOW_ARRIVAL_NAME, (line) -> { + line.add(new IconSlotWidget(line.getCurrentX(), line.y() + 2, ModGuiIcons.EXIT.getAsSprite(16, 16))); + line.add(new DLCheckBox(line.getCurrentX() + 4, line.y() + line.height() / 2 - 8, line.getRemainingWidth(), IShowExitDirectionSetting.textShowExit.getString(), settings.showExit(), (cb) -> settings.setShowExit(cb.isChecked()))); + }); + } + + static void buildShowLineColorGui(IShowLineColorSetting setting, GuiBuilderContext context) { + context.builder().addLine(IShowLineColorSetting.GUI_LINE_SHOW_LINE_COLOR_NAME, (line) -> { + line.add(new IconSlotWidget(line.getCurrentX(), line.y() + 2, ModGuiIcons.COLOR_PALETTE.getAsSprite(16, 16))); + line.add(new DLCheckBox(line.getCurrentX() + 4, line.y() + line.height() / 2 - 8, line.getRemainingWidth(), IShowLineColorSetting.textShowLineColor.getString(), setting.showLineColor(), (cb) -> setting.setShowLineColor(cb.isChecked())) { + @Override + public void renderFrontLayer(Graphics graphics, int mouseX, int mouseY, float partialTicks) { + super.renderFrontLayer(graphics, mouseX, mouseY, partialTicks); + if (!isMouseSelected()) { + return; + } + GuiUtils.renderTooltip(context.container().getParentScreen(), this, List.of(IShowLineColorSetting.textShowLineColorDescription), context.container().getParentScreen().width() / 3, graphics, mouseX, mouseY); + } + }); + }); + } + + static void buildShowConnectionGui(IShowNextConnections setting, GuiBuilderContext context) { + context.builder().addLine(IShowNextConnections.GUI_LINE_SHOW_CONNECTIONS_NAME, (line) -> { + line.add(new IconSlotWidget(line.getCurrentX(), line.y() + 2, ModGuiIcons.CONNECTIONS.getAsSprite(16, 16))); + line.add(new DLCheckBox(line.getCurrentX() + 4, line.y() + line.height() / 2 - 8, line.getRemainingWidth(), IShowNextConnections.textShowConnections.getString(), setting.showConnections(), (cb) -> setting.setShowConnection(cb.isChecked()))); + }); + } + + static void buildShowTimeAndDateGui(IShowTimeAndDateSetting setting, GuiBuilderContext context) { + context.builder().addLine(IShowTimeAndDateSetting.GUI_LINE_SHOW_TIME_NAME, (line) -> { + line.add(new IconSlotWidget(line.getCurrentX(), line.y() + 2, ModGuiIcons.TIME.getAsSprite(16, 16))); + line.add(new DLCheckBox(line.getCurrentX() + 4, line.y() + line.height() / 2 - 8, line.getRemainingWidth(), IShowTimeAndDateSetting.textShowStats.getString(), setting.showTimeAndDate(), (cb) -> setting.setShowTimeAndDate(cb.isChecked()))); + }); + } + + static void buildShowStatsGui(IShowTrainStatsSetting setting, GuiBuilderContext context) { + context.builder().addLine(IShowTrainStatsSetting.GUI_LINE_SHOW_ARRIVAL_NAME, (line) -> { + line.add(new IconSlotWidget(line.getCurrentX(), line.y() + 2, ModGuiIcons.TRAIN_INFO.getAsSprite(16, 16))); + line.add(new DLCheckBox(line.getCurrentX() + 4, line.y() + line.height() / 2 - 8, line.getRemainingWidth(), IShowTrainStatsSetting.textShowStats.getString(), setting.showStats(), (cb) -> setting.setShowStats(cb.isChecked()))); + }); + } + + static void buildTimeDisplayGui(ITimeDisplaySetting setting, GuiBuilderContext context) { + context.builder().addLine(ITimeDisplaySetting.GUI_LINE_TIME_NAME, (line) -> { + line.add(new IconSlotWidget(line.getCurrentX(), line.y() + 2, ModGuiIcons.TIME.getAsSprite(16, 16))); + line.add(new DLCreateSelectionScrollInput(context.container().getParentScreen(), line.getCurrentX() + 6, line.y() + 2, 32, 18)) + .setRenderArrow(true) + .forOptions(Arrays.stream(ETimeDisplay.values()).map(x -> TextUtils.translate(x.getValueInfoTranslationKey(CreateRailwaysNavigator.MOD_ID))).toList()) + .titled(TextUtils.translate("enum.createrailwaysnavigator.time_display")) + .addHint(TextUtils.translate("enum.createrailwaysnavigator.time_display.description")) + .format((val) -> { + return TextUtils.translate(ETimeDisplay.getById(val).getValueTranslationKey(CreateRailwaysNavigator.MOD_ID)); + }) + .setState(setting.getTimeDisplay().getId()) + .calling((i) -> { + setting.setTimeDisplay(ETimeDisplay.getById(i)); + }) + ; + }); + } + + static void buildTrainNameGui(ITrainNameWidthSetting setting, GuiBuilderContext context, boolean allowAuto, boolean allowMax) { + context.builder().addToLine(ITrainNameWidthSetting.GUI_LINE_TEXT_SIZE_NAME, (line) -> { + int w = (line.getWidth() - ITrainNameWidthSetting.USED_LINE_SPACE) / 4 - 3; + line.add(new DLCreateScrollInput(context.container().getParentScreen(), line.getCurrentX() + 4, line.y() + 2, w, 18)) + .titled(TextUtils.translate("gui.createrailwaysnavigator.display_source.advanced_display.train_name_width")) + .addHint(TextUtils.translate("gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description")) + .withRange(ITrainNameWidthSetting.MIN_VALUE - (allowAuto ? 1 : 0), ITrainNameWidthSetting.MAX_VALUE + (allowMax ? 1 : 0)) + .withShiftStep(5) + .setState(setting.getTrainNameWidth()) + .format((val) -> { + if (val < 0) { + return TextUtils.translate("gui.createrailwaysnavigator.common.auto"); + } else if (val >= 100) { + return TextUtils.translate("gui.createrailwaysnavigator.common.max"); + } + return TextUtils.text(String.valueOf(val) + "px"); + }) + .calling((i) -> { + setting.setTrainNameWidth(i.byteValue()); + }) + ; + }); + } + + static void buildTrainTextGui(ITrainTextSetting setting, GuiBuilderContext context) { + context.builder().addLine(ITrainTextSetting.GUI_LINE_SHOW_ARRIVAL_NAME, (line) -> { + line.add(new IconSlotWidget(line.getCurrentX(), line.y() + 2, ModGuiIcons.TEXT.getAsSprite(16, 16))); + line.add(new DLCreateSelectionScrollInput(context.container().getParentScreen(), line.getCurrentX() + 6, line.y() + 2, line.getRemainingWidth() - 6, 18)) + .setRenderArrow(true) + .forOptions(Arrays.stream(ETrainTextComponents.values()).map(x -> TextUtils.translate(x.getValueTranslationKey(CreateRailwaysNavigator.MOD_ID))).toList()) + .titled(TextUtils.translate("enum.createrailwaysnavigator.train_text_components")) + .addHint(TextUtils.translate("enum.createrailwaysnavigator.train_text_components.description")) + .format((val) -> { + return TextUtils.translate(ETrainTextComponents.getById(val).getValueTranslationKey(CreateRailwaysNavigator.MOD_ID)); + }) + .setState(setting.getTrainTextComponents().getId()) + .calling((i) -> { + setting.setTrainTextComponents(ETrainTextComponents.getById(i)); + }) + ; + }); + } + + public static void buildPlatformDisplayFocusGui(PlatformDisplayFocusSettings setting, GuiBuilderContext context) { + context.builder().addToLine(PlatformDisplayFocusSettings.GUI_LINE_TEXT_SIZE_NAME, (line) -> { + int w = (line.getWidth() - PlatformDisplayFocusSettings.USED_LINE_SPACE) / 4 - 3; + line.add(new DLCreateScrollInput(context.container().getParentScreen(), line.getCurrentX() + 4, line.y() + 2, w, 18)) + .titled(TextUtils.translate("gui.createrailwaysnavigator.display_source.advanced_display.train_name_width_table")) + .addHint(TextUtils.translate("gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description")) + .withRange(-1, 100) + .withShiftStep(5) + .setState(setting.getTrainNameWidth()) + .format((val) -> { + if (val < 0) { + return TextUtils.translate("gui.createrailwaysnavigator.common.auto"); + } else if (val >= 100) { + return TextUtils.translate("gui.createrailwaysnavigator.common.max"); + } + return TextUtils.text(String.valueOf(val) + "px"); + }) + .calling((i) -> { + setting.setTrainNameWidth(i.byteValue()); + }) + ; + }); + context.builder().addToLine(PlatformDisplayFocusSettings.GUI_LINE_TEXT_SIZE_NAME, (line) -> { + int w = (line.getWidth() - PlatformDisplayFocusSettings.USED_LINE_SPACE) / 4 - 3; + line.add(new DLCreateScrollInput(context.container().getParentScreen(), line.getCurrentX() + 4, line.y() + 2, w, 18)) + .titled(TextUtils.translate("gui.createrailwaysnavigator.display_source.advanced_display.platform_width_table")) + .addHint(TextUtils.translate("gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description")) + .withRange(-1, 65) + .withShiftStep(4) + .setState(setting.getPlatformWidth()) + .format((val) -> { + if (val >= 0) { + return TextUtils.text(String.valueOf(val) + "px"); + } + return TextUtils.translate("gui.createrailwaysnavigator.common.auto"); + }) + .calling((i) -> { + setting.setPlatformWidth(i.byteValue()); + }) + ; + }); + + + context.builder().addToLine(PlatformDisplayFocusSettings.GUI_LINE_TEXT_SIZE_NAME, (line) -> { + int w = (line.getWidth() - PlatformDisplayFocusSettings.USED_LINE_SPACE) / 4 - 3; + line.add(new DLCreateScrollInput(context.container().getParentScreen(), line.getCurrentX() + 4, line.y() + 2, w, 18)) + .titled(TextUtils.translate("gui.createrailwaysnavigator.display_source.advanced_display.train_name_width_next")) + .addHint(TextUtils.translate("gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description")) + .withRange(-1, 100) + .withShiftStep(5) + .setState(setting.getTrainNameWidthNextStop()) + .format((val) -> { + if (val < 0) { + return TextUtils.translate("gui.createrailwaysnavigator.common.auto"); + } else if (val >= 100) { + return TextUtils.translate("gui.createrailwaysnavigator.common.max"); + } + return TextUtils.text(String.valueOf(val) + "px"); + }) + .calling((i) -> { + setting.setTrainNameWidthNextStop(i.byteValue()); + }) + ; + }); + context.builder().addToLine(PlatformDisplayFocusSettings.GUI_LINE_TEXT_SIZE_NAME, (line) -> { + int w = (line.getWidth() - PlatformDisplayFocusSettings.USED_LINE_SPACE) / 4 - 3; + line.add(new DLCreateScrollInput(context.container().getParentScreen(), line.getCurrentX() + 4, line.y() + 2, w, 18)) + .titled(TextUtils.translate("gui.createrailwaysnavigator.display_source.advanced_display.platform_width_next")) + .addHint(TextUtils.translate("gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description")) + .withRange(-1, 65) + .withShiftStep(4) + .setState(setting.getPlatformWidthNextStop()) + .format((val) -> { + if (val >= 0) { + return TextUtils.text(String.valueOf(val) + "px"); + } + return TextUtils.translate("gui.createrailwaysnavigator.common.auto"); + }) + .calling((i) -> { + setting.setPlatformWidthNextStop(i.byteValue()); + }) + ; + }); + } + + public static void buildDepartureBoardTableGui(DepartureBoardDisplayTableSettings setting, GuiBuilderContext context) { + MutableSingle stopovers = new MutableSingle(null); + MutableSingle info = new MutableSingle(null); + context.builder().addToLine(DepartureBoardDisplayTableSettings.GUI_LINE_TEXT_SIZE_NAME, (line) -> { + int w = (line.getWidth() - DepartureBoardDisplayTableSettings.USED_LINE_SPACE) / 4 - 3; + stopovers.setFirst(new DLCreateScrollInput(context.container().getParentScreen(), line.getCurrentX() + 4, line.y() + 2, w, 18) + .titled(TextUtils.translate("gui.createrailwaysnavigator.display_source.advanced_display.stopovers_width")) + .addHint(TextUtils.translate("gui.createrailwaysnavigator.display_source.advanced_display.stopovers_width.description")) + .withRange(0, 101) + .withShiftStep(5) + .setState((int)(setting.getStopoversWidthPercentage() * 100)) + .format((val) -> { + return TextUtils.text(String.valueOf(val) + "%"); + }) + .calling((i) -> { + setting.setStopoversWidthPercentageInt(i.byteValue()); + DLUtils.doIfNotNull(info.getFirst(), x -> x.withRange(0, MathUtils.clamp(101 - i, 0, 101))); + }) + ); + line.add(stopovers.getFirst()); + if (stopovers.getFirst() != null && info.getFirst() != null) { + stopovers.getFirst().withRange(0, MathUtils.clamp(101 - info.getFirst().getState(), 0, 101)); + info.getFirst().withRange(0, MathUtils.clamp(101 - stopovers.getFirst().getState(), 0, 101)); + } + }); + context.builder().addToLine(DepartureBoardDisplayTableSettings.GUI_LINE_TEXT_SIZE_NAME, (line) -> { + int w = (line.getWidth() - DepartureBoardDisplayTableSettings.USED_LINE_SPACE) / 4 - 3; + info.setFirst(new DLCreateScrollInput(context.container().getParentScreen(), line.getCurrentX() + 4, line.y() + 2, w, 18) + .titled(TextUtils.translate("gui.createrailwaysnavigator.display_source.advanced_display.info_width")) + .addHint(TextUtils.translate("gui.createrailwaysnavigator.display_source.advanced_display.info_width.description")) + .withRange(0, 101) + .withShiftStep(5) + .setState((int)(setting.getInfoWidthPercentage() * 100)) + .format((val) -> { + return TextUtils.text(String.valueOf(val) + "%"); + }) + .calling((i) -> { + setting.setInfoWidthPercentageInt(i.byteValue()); + DLUtils.doIfNotNull(stopovers.getFirst(), x -> x.withRange(0, MathUtils.clamp(101 - i, 0, 101))); + }) + ); + line.add(info.getFirst()); + if (stopovers.getFirst() != null && info.getFirst() != null) { + stopovers.getFirst().withRange(0, MathUtils.clamp(101 - info.getFirst().getState(), 0, 101)); + info.getFirst().withRange(0, MathUtils.clamp(101 - stopovers.getFirst().getState(), 0, 101)); + } + }); + } + +} diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/ICarriageIndexSetting.java b/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/ICarriageIndexSetting.java new file mode 100644 index 00000000..a77dd992 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/ICarriageIndexSetting.java @@ -0,0 +1,36 @@ +package de.mrjulsen.crn.block.display.properties.components; + +import de.mrjulsen.crn.block.display.properties.IDisplaySettings; +import de.mrjulsen.crn.client.gui.widgets.modular.GuiBuilderContext; +import de.mrjulsen.mcdragonlib.util.TextUtils; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.network.chat.MutableComponent; + +public interface ICarriageIndexSetting { + + public static final String GUI_LINE_CARRIAGE_INDEX_NAME = "carriage_index"; + + public static final String NBT_CARRIAGE_INDEX = "CarriageIndexOffset"; + public static final String NBT_OVERWRITE_CARRIAGE_INDEX = "OverwriteCarriageIndex"; + + public static final MutableComponent textOverwriteCarriageIndex = TextUtils.translate("gui.createrailwaysnavigator.advanced_display_settings.overwrite_carriage_index"); + public static final MutableComponent textOverwriteCarriageIndexDescription = TextUtils.translate("gui.createrailwaysnavigator.advanced_display_settings.overwrite_carriage_index.description"); + + byte getCarriageIndex(); + boolean shouldOverwriteCarriageIndex(); + void setCarriageIndex(byte b); + void setOverwriteCarriageIndex(boolean b); + + @Environment(EnvType.CLIENT) + default void buildCarriageIndexGui(GuiBuilderContext context) { + GuiBuilderWrapper.buildCarriageIndexGui(this, context); + } + + default void copyCarriageIndexSetting(IDisplaySettings oldSettings) { + if (oldSettings instanceof ICarriageIndexSetting o) { + setCarriageIndex(o.getCarriageIndex()); + setOverwriteCarriageIndex(o.shouldOverwriteCarriageIndex()); + } + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/IColorSetting.java b/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/IColorSetting.java new file mode 100644 index 00000000..7e27cdaa --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/IColorSetting.java @@ -0,0 +1,39 @@ +package de.mrjulsen.crn.block.display.properties.components; + +import de.mrjulsen.crn.CreateRailwaysNavigator; +import de.mrjulsen.crn.block.display.properties.IDisplaySettings; +import de.mrjulsen.crn.client.gui.widgets.modular.GuiBuilderContext; +import de.mrjulsen.mcdragonlib.util.TextUtils; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.ChatFormatting; +import net.minecraft.network.chat.MutableComponent; + +public interface IColorSetting { + + public static final String GUI_LINE_COLORS_NAME = "color"; + + public static final String NBT_FONT_COLOR = "FontColor"; + public static final String NBT_BACK_COLOR = "BackColor"; + + public static final MutableComponent textFontColor = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".advanced_display_settings.font_color"); + public static final MutableComponent textBackColor = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".advanced_display_settings.back_color"); + public static final MutableComponent textClickToEdit = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".common.click_to_edit").withStyle(ChatFormatting.DARK_GRAY).withStyle(ChatFormatting.ITALIC); + + int getFontColor(); + int getBackColor(); + void setFontColor(int color); + void setBackColor(int color); + + @Environment(EnvType.CLIENT) + default void buildColorGui(GuiBuilderContext context) { + GuiBuilderWrapper.buildColorGui(this, context); + } + + default void copyColorSetting(IDisplaySettings oldSettings) { + if (oldSettings instanceof IColorSetting o) { + setBackColor(o.getBackColor()); + setFontColor(o.getFontColor()); + } + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/ICustomTextWidthSetting.java b/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/ICustomTextWidthSetting.java new file mode 100644 index 00000000..b173a1ab --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/ICustomTextWidthSetting.java @@ -0,0 +1,16 @@ +package de.mrjulsen.crn.block.display.properties.components; + +import de.mrjulsen.crn.client.gui.widgets.modular.GuiBuilderContext; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +public interface ICustomTextWidthSetting { + public static final String GUI_LINE_TEXT_SIZE_NAME = "text_width"; + + public static final int USED_LINE_SPACE = 18 + 4; + + @Environment(EnvType.CLIENT) + default void buildBasicTextWidthGui(GuiBuilderContext context) { + GuiBuilderWrapper.buildBasicTextWidthGui(this, context); + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/IPlatformWidthSetting.java b/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/IPlatformWidthSetting.java new file mode 100644 index 00000000..03b6859a --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/IPlatformWidthSetting.java @@ -0,0 +1,36 @@ +package de.mrjulsen.crn.block.display.properties.components; + +import de.mrjulsen.crn.block.display.properties.IDisplaySettings; +import de.mrjulsen.crn.client.gui.widgets.modular.GuiBuilderContext; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +/** + * For data conversion: Indicates that this class adopts the original + * property {@code platformWidth} from the Advanced Displays. + * If the class should adopt this property, this interface must be + * implemented or the value will not be converted! + */ +public interface IPlatformWidthSetting extends ICustomTextWidthSetting { + + public static final String NBT_PLATFORM_WIDTH = "PlatformWidth"; + + byte getPlatformWidth(); + void setPlatformWidth(byte b); + + @Environment(EnvType.CLIENT) + default void buildPlatformWidthGui(GuiBuilderContext context, boolean allowAuto) { + buildBasicTextWidthGui(context); + GuiBuilderWrapper.buildPlatformWidthGui(this, context, allowAuto); + } + + default void copyPlatformWidthSetting(IDisplaySettings oldSettings) { + if (oldSettings instanceof IPlatformWidthSetting o) { + setPlatformWidth(o.getPlatformWidth()); + } + } + + default boolean isAutoPlatformWidth() { + return getPlatformWidth() < 0; + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/IShowArrivalSetting.java b/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/IShowArrivalSetting.java new file mode 100644 index 00000000..eba880cb --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/IShowArrivalSetting.java @@ -0,0 +1,33 @@ +package de.mrjulsen.crn.block.display.properties.components; + +import de.mrjulsen.crn.CreateRailwaysNavigator; +import de.mrjulsen.crn.block.display.properties.IDisplaySettings; +import de.mrjulsen.crn.client.gui.widgets.modular.GuiBuilderContext; +import de.mrjulsen.mcdragonlib.util.TextUtils; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.network.chat.MutableComponent; + +public interface IShowArrivalSetting { + + public static final String GUI_LINE_SHOW_ARRIVAL_NAME = "show_arrival"; + + public static final String NBT_SHOW_ARRIVAL = "ShowArrival"; + + public static final MutableComponent textShowArrival = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".advanced_display_settings.show_arrival"); + public static final MutableComponent textShowArrivalDescription = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".advanced_display_settings.show_arrival.description"); + + boolean showArrival(); + void setShowArrival(boolean b); + + @Environment(EnvType.CLIENT) + default void buildShowArrivalGui(GuiBuilderContext context) { + GuiBuilderWrapper.buildShowArrivalGui(this, context); + } + + default void copyShowArrivalSetting(IDisplaySettings oldSettings) { + if (oldSettings instanceof IShowArrivalSetting o) { + setShowArrival(o.showArrival()); + } + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/IShowExitDirectionSetting.java b/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/IShowExitDirectionSetting.java new file mode 100644 index 00000000..48fe7216 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/IShowExitDirectionSetting.java @@ -0,0 +1,32 @@ +package de.mrjulsen.crn.block.display.properties.components; + +import de.mrjulsen.crn.CreateRailwaysNavigator; +import de.mrjulsen.crn.block.display.properties.IDisplaySettings; +import de.mrjulsen.crn.client.gui.widgets.modular.GuiBuilderContext; +import de.mrjulsen.mcdragonlib.util.TextUtils; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.network.chat.MutableComponent; + +public interface IShowExitDirectionSetting { + + public static final String GUI_LINE_SHOW_ARRIVAL_NAME = "show_exit"; + + public static final String NBT_SHOW_EXIT = "ShowExit"; + + public static final MutableComponent textShowExit = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".advanced_display_settings.show_exit"); + + boolean showExit(); + void setShowExit(boolean b); + + @Environment(EnvType.CLIENT) + default void buildShowExitGui(GuiBuilderContext context) { + GuiBuilderWrapper.buildShowExitGui(this, context); + } + + default void copyShowExitSetting(IDisplaySettings oldSettings) { + if (oldSettings instanceof IShowExitDirectionSetting o) { + setShowExit(o.showExit()); + } + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/IShowLineColorSetting.java b/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/IShowLineColorSetting.java new file mode 100644 index 00000000..abfcfb95 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/IShowLineColorSetting.java @@ -0,0 +1,33 @@ +package de.mrjulsen.crn.block.display.properties.components; + +import de.mrjulsen.crn.CreateRailwaysNavigator; +import de.mrjulsen.crn.block.display.properties.IDisplaySettings; +import de.mrjulsen.crn.client.gui.widgets.modular.GuiBuilderContext; +import de.mrjulsen.mcdragonlib.util.TextUtils; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.network.chat.MutableComponent; + +public interface IShowLineColorSetting { + + public static final String GUI_LINE_SHOW_LINE_COLOR_NAME = "show_line_color"; + + public static final String NBT_SHOW_LINE_COLOR = "ShowLineColor"; + + public static final MutableComponent textShowLineColor = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".advanced_display_settings.show_line_color"); + public static final MutableComponent textShowLineColorDescription = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".advanced_display_settings.show_line_color.description"); + + boolean showLineColor(); + void setShowLineColor(boolean b); + + @Environment(EnvType.CLIENT) + default void buildShowLineColorGui(GuiBuilderContext context) { + GuiBuilderWrapper.buildShowLineColorGui(this, context); + } + + default void copyShowLineColorSetting(IDisplaySettings oldSettings) { + if (oldSettings instanceof IShowLineColorSetting o) { + setShowLineColor(o.showLineColor()); + } + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/IShowNextConnections.java b/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/IShowNextConnections.java new file mode 100644 index 00000000..a855a6eb --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/IShowNextConnections.java @@ -0,0 +1,32 @@ +package de.mrjulsen.crn.block.display.properties.components; + +import de.mrjulsen.crn.CreateRailwaysNavigator; +import de.mrjulsen.crn.block.display.properties.IDisplaySettings; +import de.mrjulsen.crn.client.gui.widgets.modular.GuiBuilderContext; +import de.mrjulsen.mcdragonlib.util.TextUtils; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.network.chat.MutableComponent; + +public interface IShowNextConnections { + + public static final String GUI_LINE_SHOW_CONNECTIONS_NAME = "show_connections"; + + public static final String NBT_SHOW_CONNECTIONS = "ShowConnections"; + + public static final MutableComponent textShowConnections = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".advanced_display_settings.show_connections"); + + boolean showConnections(); + void setShowConnection(boolean b); + + @Environment(EnvType.CLIENT) + default void buildShowConnectionGui(GuiBuilderContext context) { + GuiBuilderWrapper.buildShowConnectionGui(this, context); + } + + default void copyShowConnectionSetting(IDisplaySettings oldSettings) { + if (oldSettings instanceof IShowNextConnections o) { + setShowConnection(o.showConnections()); + } + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/IShowTimeAndDateSetting.java b/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/IShowTimeAndDateSetting.java new file mode 100644 index 00000000..f1c3d804 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/IShowTimeAndDateSetting.java @@ -0,0 +1,32 @@ +package de.mrjulsen.crn.block.display.properties.components; + +import de.mrjulsen.crn.CreateRailwaysNavigator; +import de.mrjulsen.crn.block.display.properties.IDisplaySettings; +import de.mrjulsen.crn.client.gui.widgets.modular.GuiBuilderContext; +import de.mrjulsen.mcdragonlib.util.TextUtils; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.network.chat.MutableComponent; + +public interface IShowTimeAndDateSetting { + + public static final String GUI_LINE_SHOW_TIME_NAME = "show_time"; + + public static final String NBT_SHOW_TIME_AND_DATE = "ShowTime"; + + public static final MutableComponent textShowStats = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".advanced_display_settings.show_time_and_date"); + + boolean showTimeAndDate(); + void setShowTimeAndDate(boolean b); + + @Environment(EnvType.CLIENT) + default void buildShowTimeAndDateGui(GuiBuilderContext context) { + GuiBuilderWrapper.buildShowTimeAndDateGui(this, context); + } + + default void copyShowTimeAndDateSetting(IDisplaySettings oldSettings) { + if (oldSettings instanceof IShowTimeAndDateSetting o) { + setShowTimeAndDate(o.showTimeAndDate()); + } + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/IShowTrainStatsSetting.java b/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/IShowTrainStatsSetting.java new file mode 100644 index 00000000..f8819d47 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/IShowTrainStatsSetting.java @@ -0,0 +1,32 @@ +package de.mrjulsen.crn.block.display.properties.components; + +import de.mrjulsen.crn.CreateRailwaysNavigator; +import de.mrjulsen.crn.block.display.properties.IDisplaySettings; +import de.mrjulsen.crn.client.gui.widgets.modular.GuiBuilderContext; +import de.mrjulsen.mcdragonlib.util.TextUtils; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.network.chat.MutableComponent; + +public interface IShowTrainStatsSetting { + + public static final String GUI_LINE_SHOW_ARRIVAL_NAME = "show_stats"; + + public static final String NBT_SHOW_STATS = "ShowStats"; + + public static final MutableComponent textShowStats = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".advanced_display_settings.show_stats"); + + boolean showStats(); + void setShowStats(boolean b); + + @Environment(EnvType.CLIENT) + default void buildShowStatsGui(GuiBuilderContext context) { + GuiBuilderWrapper.buildShowStatsGui(this, context); + } + + default void copyShowStatsSetting(IDisplaySettings oldSettings) { + if (oldSettings instanceof IShowTrainStatsSetting o) { + setShowStats(o.showStats()); + } + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/ITimeDisplaySetting.java b/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/ITimeDisplaySetting.java new file mode 100644 index 00000000..54b48bbc --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/ITimeDisplaySetting.java @@ -0,0 +1,33 @@ +package de.mrjulsen.crn.block.display.properties.components; + +import de.mrjulsen.crn.block.display.properties.IDisplaySettings; +import de.mrjulsen.crn.block.properties.ETimeDisplay; +import de.mrjulsen.crn.client.gui.widgets.modular.GuiBuilderContext; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +/** + * For data conversion: Indicates that this class adopts the original + * property {@code timeDisplay} from the Advanced Displays. + * If the class should adopt this property, this interface must be + * implemented or the value will not be converted! + */ +public interface ITimeDisplaySetting extends ICustomTextWidthSetting { + + public static final String GUI_LINE_TIME_NAME = "time"; + public static final String NBT_TIME_DISPLAY = "TimeDisplay"; + + ETimeDisplay getTimeDisplay(); + void setTimeDisplay(ETimeDisplay display); + + @Environment(EnvType.CLIENT) + default void buildTimeDisplayGui(GuiBuilderContext context) { + GuiBuilderWrapper.buildTimeDisplayGui(this, context); + } + + default void copyTimeDisplaySetting(IDisplaySettings oldSettings) { + if (oldSettings instanceof ITimeDisplaySetting o) { + setTimeDisplay(o.getTimeDisplay()); + } + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/ITrainNameWidthSetting.java b/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/ITrainNameWidthSetting.java new file mode 100644 index 00000000..bc079b4d --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/ITrainNameWidthSetting.java @@ -0,0 +1,43 @@ +package de.mrjulsen.crn.block.display.properties.components; + +import de.mrjulsen.crn.block.display.properties.IDisplaySettings; +import de.mrjulsen.crn.client.gui.widgets.modular.GuiBuilderContext; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +/** + * For data conversion: Indicates that this class adopts the original + * property {@code timeDisplay} from the Advanced Displays. + * If the class should adopt this property, this interface must be + * implemented or the value will not be converted! + */ +public interface ITrainNameWidthSetting extends ICustomTextWidthSetting { + + public static final int DEFAULT_TRAIN_NAME_WIDTH = 16; + public static final int MIN_VALUE = 0; + public static final int MAX_VALUE = 100; + public static final String NBT_TRAIN_NAME_WIDTH = "TrainNameWidth"; + + byte getTrainNameWidth(); + void setTrainNameWidth(byte b); + + @Environment(EnvType.CLIENT) + default void buildTrainNameGui(GuiBuilderContext context, boolean allowAuto, boolean allowMax) { + buildBasicTextWidthGui(context); + GuiBuilderWrapper.buildTrainNameGui(this, context, allowAuto, allowMax); + } + + default void copyTrainNameSetting(IDisplaySettings oldSettings) { + if (oldSettings instanceof ITrainNameWidthSetting o) { + setTrainNameWidth(o.getTrainNameWidth()); + } + } + + default boolean isAutoTrainNameWidth() { + return getTrainNameWidth() < MIN_VALUE; + } + + default boolean isFullTrainNameWidth() { + return getTrainNameWidth() >= MAX_VALUE; + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/ITrainTextSetting.java b/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/ITrainTextSetting.java new file mode 100644 index 00000000..2477f364 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/block/display/properties/components/ITrainTextSetting.java @@ -0,0 +1,76 @@ +package de.mrjulsen.crn.block.display.properties.components; + +import java.util.Arrays; + +import de.mrjulsen.crn.block.display.properties.IDisplaySettings; +import de.mrjulsen.crn.client.gui.widgets.modular.GuiBuilderContext; +import de.mrjulsen.mcdragonlib.core.ITranslatableEnum; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.util.StringRepresentable; + +public interface ITrainTextSetting { + + public static enum ETrainTextComponents implements StringRepresentable, ITranslatableEnum { + ALL((byte)0, "all"), + TRAIN_NAME((byte)1, "train_name"), + DESTINATION((byte)2, "destination"); + + final String name; + final byte id; + + ETrainTextComponents(byte id, String name) { + this.name = name; + this.id = id; + } + + public byte getId() { + return this.id; + } + + public static ETrainTextComponents getById(int id) { + return Arrays.stream(values()).filter(x -> x.getId() == (byte)id).findFirst().orElse(ETrainTextComponents.ALL); + } + + @Override + public String getSerializedName() { + return name; + } + + @Override + public String getEnumName() { + return "train_text_components"; + } + + @Override + public String getEnumValueName() { + return this.name; + } + + public boolean showTrainName() { + return this == ALL || this == TRAIN_NAME; + } + + public boolean showDestination() { + return this == ALL || this == DESTINATION; + } + } + + public static final String GUI_LINE_SHOW_ARRIVAL_NAME = "train_text"; + + public static final String NBT_TRAIN_TEXT = "TrainText"; + + ETrainTextComponents getTrainTextComponents(); + void setTrainTextComponents(ETrainTextComponents v); + + @Environment(EnvType.CLIENT) + default void buildTrainTextGui(GuiBuilderContext context) { + GuiBuilderWrapper.buildTrainTextGui(this, context); + } + + default void copyTrainTextSetting(IDisplaySettings oldSettings) { + if (oldSettings instanceof ITrainTextSetting o) { + setTrainTextComponents(o.getTrainTextComponents()); + } + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/block/properties/EDisplayType.java b/common/src/main/java/de/mrjulsen/crn/block/properties/EDisplayType.java index 2cb9b15b..7424b3db 100644 --- a/common/src/main/java/de/mrjulsen/crn/block/properties/EDisplayType.java +++ b/common/src/main/java/de/mrjulsen/crn/block/properties/EDisplayType.java @@ -9,7 +9,8 @@ public enum EDisplayType implements StringRepresentable, ITranslatableEnum { TRAIN_DESTINATION((byte)0, "train_destination", ModGuiIcons.TRAIN_DESTINATION, EDisplayTypeDataSource.TRAIN_INFORMATION), PASSENGER_INFORMATION((byte)1, "passenger_information", ModGuiIcons.PASSENGER_INFORMATION, EDisplayTypeDataSource.TRAIN_INFORMATION), - PLATFORM((byte)2, "platform", ModGuiIcons.PLATFORM_INFORMATION, EDisplayTypeDataSource.PLATFORM); + PLATFORM((byte)2, "platform", ModGuiIcons.PLATFORM_INFORMATION, EDisplayTypeDataSource.PLATFORM), + DEPARTURE_BOARD((byte)3, "departure_board", ModGuiIcons.PLATFORM_INFORMATION, EDisplayTypeDataSource.PLATFORM); private String name; private byte id; @@ -43,6 +44,10 @@ public static EDisplayType getTypeById(int id) { return Arrays.stream(values()).filter(x -> x.getId() == (byte)id).findFirst().orElse(EDisplayType.TRAIN_DESTINATION); } + public static EDisplayType getTypeByName(String name) { + return Arrays.stream(values()).filter(x -> x.name.equals(name)).findFirst().orElse(EDisplayType.TRAIN_DESTINATION); + } + @Override public String getSerializedName() { return name; diff --git a/common/src/main/java/de/mrjulsen/crn/block/properties/ETimeDisplay.java b/common/src/main/java/de/mrjulsen/crn/block/properties/ETimeDisplay.java new file mode 100644 index 00000000..56580e4f --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/block/properties/ETimeDisplay.java @@ -0,0 +1,47 @@ +package de.mrjulsen.crn.block.properties; + +import java.util.Arrays; + +import de.mrjulsen.mcdragonlib.core.ITranslatableEnum; +import net.minecraft.util.StringRepresentable; + +public enum ETimeDisplay implements StringRepresentable, ITranslatableEnum { + ABS((byte)0, "abs"), + ETA((byte)1, "eta"); + + private byte id; + private String name; + + private ETimeDisplay(byte id, String name) { + this.id = id; + this.name = name; + } + + public byte getId() { + return id; + } + + public String getName() { + return name; + } + + public static ETimeDisplay getById(int id) { + return Arrays.stream(values()).filter(x -> x.getId() == id).findFirst().orElse(ABS); + } + + @Override + public String getEnumName() { + return "time_display"; + } + + @Override + public String getEnumValueName() { + return getName(); + } + + @Override + public String getSerializedName() { + return getName(); + } + +} \ No newline at end of file diff --git a/common/src/main/java/de/mrjulsen/crn/client/AdvancedDisplaysRegistry.java b/common/src/main/java/de/mrjulsen/crn/client/AdvancedDisplaysRegistry.java index fe56c601..c413ef5b 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/AdvancedDisplaysRegistry.java +++ b/common/src/main/java/de/mrjulsen/crn/client/AdvancedDisplaysRegistry.java @@ -10,92 +10,135 @@ import de.mrjulsen.crn.CreateRailwaysNavigator; import de.mrjulsen.crn.block.blockentity.AdvancedDisplayBlockEntity; +import de.mrjulsen.crn.block.display.properties.BasicDisplaySettings; +import de.mrjulsen.crn.block.display.properties.IDisplaySettings; import de.mrjulsen.crn.block.properties.EDisplayType; -import de.mrjulsen.crn.client.ber.AdvancedDisplayRenderInstance; -import de.mrjulsen.crn.client.ber.IBERRenderSubtype; +import de.mrjulsen.crn.registry.ModDisplayTypes; +import de.mrjulsen.crn.client.ber.variants.AbstractAdvancedDisplayRenderer; import de.mrjulsen.crn.client.ber.variants.BERError; -import de.mrjulsen.mcdragonlib.data.Pair; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; public final class AdvancedDisplaysRegistry { - public static record DisplayTypeResourceKey(EDisplayType category, ResourceLocation id) { - private static final String NBT_CATEGORY = "Category"; - private static final String NBT_ID = "Id"; + + public static record DisplayTypeResourceKey(EDisplayType category, String name) { + private static final String NBT_ID = "DisplayId"; + @Deprecated private static final String LEGACY_NBT_ID = "Id"; + @Deprecated private static final String LEGACY_NBT_CATEGORY = "Category"; + @Override public final boolean equals(Object arg) { - return arg instanceof DisplayTypeResourceKey o && category == o.category && id.equals(o.id); + return arg instanceof DisplayTypeResourceKey o && category() == o.category() && name().equals(o.name()); } + @Override public final int hashCode() { - return Objects.hash(category, id); + return Objects.hash(category(), name()); + } + + public void toNbt(CompoundTag nbt) { + nbt.putString(NBT_ID, getLocation().toString()); } - public CompoundTag toNbt() { - CompoundTag nbt = new CompoundTag(); - nbt.putByte(NBT_CATEGORY, category().getId()); - nbt.putString(NBT_ID, id().toString()); - return nbt; + + public ResourceLocation getLocation() { + return new ResourceLocation(CreateRailwaysNavigator.MOD_ID, category().getInfoTypeName() + "/" + name()); + } + + @Deprecated + public static DisplayTypeResourceKey legacy_fromNbt(CompoundTag nbt) { + return new DisplayTypeResourceKey(EDisplayType.getTypeById(nbt.getByte(LEGACY_NBT_CATEGORY)), new ResourceLocation(nbt.getString(LEGACY_NBT_ID)).getPath()); } + public static DisplayTypeResourceKey fromNbt(CompoundTag nbt) { - return new DisplayTypeResourceKey(EDisplayType.getTypeById(nbt.getByte(NBT_CATEGORY)), new ResourceLocation(nbt.getString(NBT_ID))); + String id = nbt.getString(NBT_ID); + String[] data = new ResourceLocation(id).getPath().split("/"); + return new DisplayTypeResourceKey(data.length > 0 ? EDisplayType.getTypeByName(data[0]) : ModDisplayTypes.TRAIN_DESTINATION_SIMPLE.category(), data.length > 1 ? data[1] : ModDisplayTypes.TRAIN_DESTINATION_SIMPLE.name()); } + public String getTranslationKey() { - return "display." + CreateRailwaysNavigator.MOD_ID + "." + category().getEnumValueName() + "." + id.getPath(); + return "display." + CreateRailwaysNavigator.MOD_ID + "." + category().getEnumValueName() + "." + name(); + } + + @Override + public final String toString() { + return "DisplayType[" + category().getEnumValueName() + "/" + name() + "]"; } } + + /** + * Contains all information about the registered display. + */ + protected static record DisplayRegistrationData>(Supplier customizationSettings, Supplier renderer, DisplayProperties properties) {} /** - * @param singleLined Whether the display can be connected vertically. + * Constant, server-side properties that define the display in more detail. + * @param singleLined Whether the display can be connected vertically or not. * @param platformDisplayTrainsCount For Platform Displays only! Specifies how many trains can be shown on the display, depending on the properties of the display. If used correctly, this reduces network traffic, as data about trains that do not fit on the display are not transferred from the server. */ - public static record DisplayTypeInfo(boolean singleLined, Function platformDisplayTrainsCount) {} + public static record DisplayProperties(boolean singleLined, Function platformDisplayTrainsCount) {} - private static final Map>, DisplayTypeInfo>>> displayTypes = new HashMap<>(); + //private static final Map>, DisplayProperties>>> displayTypes = new HashMap<>(); + private static final Map>> newDisplayTypes = new HashMap<>(); /** * Registers a new display type that can then be used in CRN. + * @param The display settings type used by the renderer. + * @param The type of the display renderer. * @param category The display category to which the type should be assigned. - * @param id The id of the display type. - * @param displayRenderer The reference of the Renderer class that renders the contents of the display. - * @param info Additional information about this display type - * @return + * @param name The name of the display type. Must be unique in each category! + * @param settings A class containing all customization options for this specific display type. + * @param renderer The reference of the renderer class that renders the contents of the display. + * @param properties Additional constant properties of the display type. + * @return The key of the registered display type. */ - public static DisplayTypeResourceKey registerDisplayType(EDisplayType category, ResourceLocation id, Supplier> displayRenderer, DisplayTypeInfo info) { - Map>, DisplayTypeInfo>> reg = displayTypes.computeIfAbsent(category, x -> new HashMap<>()); - if (reg.containsKey(id)) { - throw new IllegalArgumentException("A display type with the id '" + id + "' is already registered!"); + public static > DisplayTypeResourceKey register(EDisplayType category, String name, Supplier settings, Supplier renderer, DisplayProperties properties) { + DisplayTypeResourceKey key = new DisplayTypeResourceKey(category, name); + Map> reg = newDisplayTypes.computeIfAbsent(category, x -> new HashMap<>()); + + if (reg.containsKey(name)) { + throw new IllegalArgumentException("A display type with the id '" + key + "' is already registered!"); } - reg.put(id, Pair.of(displayRenderer, info)); - return new DisplayTypeResourceKey(category, id); + reg.put(name, new DisplayRegistrationData<>(settings, renderer, properties)); + return key; } public static boolean isRegietered(DisplayTypeResourceKey key) { - return key != null && displayTypes.containsKey(key.category()) && displayTypes.get(key.category()).containsKey(key.id()); + return key != null && newDisplayTypes.containsKey(key.category()) && newDisplayTypes.get(key.category()).containsKey(key.name()); } - public static IBERRenderSubtype getRenderer(DisplayTypeResourceKey key) { + @Environment(EnvType.CLIENT) + public static AbstractAdvancedDisplayRenderer createRenderer(DisplayTypeResourceKey key) { if (!isRegietered(key)) { return new BERError(); } - return displayTypes.get(key.category()).get(key.id()).getFirst().get(); + return newDisplayTypes.get(key.category()).get(key.name()).renderer().get(); + } + + public static IDisplaySettings createSettings(DisplayTypeResourceKey key) { + if (!isRegietered(key)) { + return new BasicDisplaySettings(); + } + return newDisplayTypes.get(key.category()).get(key.name()).customizationSettings().get(); } - public static DisplayTypeInfo getInfo(DisplayTypeResourceKey key) { + public static DisplayProperties getProperties(DisplayTypeResourceKey key) { if (!isRegietered(key)) { - return new DisplayTypeInfo(true, $ -> 0); + return new DisplayProperties(true, $ -> 0); } - return displayTypes.get(key.category()).get(key.id()).getSecond(); + return newDisplayTypes.get(key.category()).get(key.name()).properties(); } - public static Map getAllOfType(EDisplayType type) { - return displayTypes.get(type).entrySet().stream().collect(Collectors.toMap(a -> a.getKey(), b -> b.getValue().getSecond())); + public static Map getAllOfType(EDisplayType type) { + return newDisplayTypes.get(type).entrySet().stream().collect(Collectors.toMap(a -> a.getKey(), b -> b.getValue().properties())); } public static List getAllOfTypeAsKey(EDisplayType type) { - return displayTypes.get(type).entrySet().stream().map(x -> new DisplayTypeResourceKey(type, x.getKey())).toList(); + return newDisplayTypes.get(type).entrySet().stream().map(x -> new DisplayTypeResourceKey(type, x.getKey())).toList(); } - public static List getAllIdsOfType(EDisplayType type) { - return displayTypes.get(type).entrySet().stream().map(x -> x.getKey()).toList(); + public static List getAllNamesOfType(EDisplayType type) { + return newDisplayTypes.get(type).entrySet().stream().map(x -> x.getKey()).toList(); } } diff --git a/common/src/main/java/de/mrjulsen/crn/client/ClientWrapper.java b/common/src/main/java/de/mrjulsen/crn/client/ClientWrapper.java index 7385ce21..35d48965 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/ClientWrapper.java +++ b/common/src/main/java/de/mrjulsen/crn/client/ClientWrapper.java @@ -18,12 +18,14 @@ import de.mrjulsen.crn.client.gui.NavigatorToast; import de.mrjulsen.crn.client.gui.screen.AdvancedDisplaySettingsScreen; import de.mrjulsen.crn.client.gui.screen.NavigatorScreen; +import de.mrjulsen.crn.client.gui.screen.TrainSeparationSettingsScreen; import de.mrjulsen.crn.client.gui.screen.TrainDebugScreen; import de.mrjulsen.crn.client.gui.screen.TrainSectionSettingsScreen; import de.mrjulsen.crn.client.gui.widgets.ResizableButton; -import de.mrjulsen.crn.client.lang.ELanguage; +import de.mrjulsen.crn.client.lang.CustomLanguage; import de.mrjulsen.crn.config.ModClientConfig; import de.mrjulsen.crn.data.schedule.condition.DynamicDelayCondition; +import de.mrjulsen.crn.data.schedule.condition.TrainSeparationCondition; import de.mrjulsen.crn.data.schedule.instruction.ResetTimingsInstruction; import de.mrjulsen.crn.data.schedule.instruction.TravelSectionInstruction; import de.mrjulsen.crn.mixin.ModularGuiLineBuilderAccessor; @@ -53,7 +55,7 @@ public class ClientWrapper { - private static ELanguage currentLanguage; + private static CustomLanguage currentLanguage; private static Language currentClientLanguage; public static void showNavigatorGui() { @@ -73,14 +75,14 @@ public static void showAdvancedDisplaySettingsScreen(AdvancedDisplayBlockEntity DLScreen.setScreen(new AdvancedDisplaySettingsScreen(blockEntity)); } - public static void updateLanguage(ELanguage lang, boolean force) { + public static void updateLanguage(CustomLanguage lang, boolean force) { if (currentLanguage == lang && !force) { return; } - LanguageInfo info = lang == ELanguage.DEFAULT ? null : Minecraft.getInstance().getLanguageManager().getLanguage(lang.getCode()); + LanguageInfo info = lang == CustomLanguage.DEFAULT ? null : Minecraft.getInstance().getLanguageManager().getLanguage(lang.getCode()); currentLanguage = lang; - if (lang == ELanguage.DEFAULT || info == null) { + if (lang == CustomLanguage.DEFAULT || info == null) { currentClientLanguage = Language.getInstance(); CreateRailwaysNavigator.LOGGER.info("Updated custom language to: (Default)"); } else { @@ -122,7 +124,7 @@ public static void initScheduleSectionInstruction(TravelSectionInstruction instr ModularGuiLineBuilderAccessor accessor = (ModularGuiLineBuilderAccessor)builder; - ResizableButton btn = new ResizableButton(accessor.crn$getX(), accessor.crn$getY() - 4, 121, 16, TextUtils.translate(CreateRailwaysNavigator.MOD_ID + ".schedule.instruction." + instruction.getId().getPath() + ".configure"), + ResizableButton btn = new ResizableButton(accessor.crn$getX(), accessor.crn$getY() - 4, 121, 16, TextUtils.translate(CreateRailwaysNavigator.MOD_ID + ".schedule.instruction.configure"), (b) -> { if (Minecraft.getInstance().screen instanceof ScheduleScreen scheduleScreen) { ((ScheduleScreenAccessor)scheduleScreen).crn$getOnEditorClose().accept(true); @@ -195,4 +197,58 @@ public void renderButton(PoseStack poseStack, int mouseX, int mouseY, float part }; accessor.crn$getTarget().add(Pair.of(btn, "help_btn")); } + + @SuppressWarnings("resource") + public static void initTimingAdjustmentGui(TrainSeparationCondition condition, ModularGuiLineBuilder builder) { + + /* + builder.addScrollInput(0, 26, (i, l) -> { + i.titled(Lang.translateDirect("generic.duration")) + .withShiftStep(15) + .withRange(0, 121); + i.lockedTooltipX = -15; + i.lockedTooltipY = 35; + }, "Value"); + + builder.addSelectionScrollInput(26, 15, (i, l) -> { + i.forOptions(TimeUnit.translatedOptions()) + .titled(Lang.translateDirect("generic.timeUnit")) + .format((idx) -> { + return TextUtils.text(switch (TimeUnit.values()[idx]) { + case MINUTES -> "m"; + case SECONDS -> "s"; + default -> "t"; + }); + }) + ; + }, "TimeUnit"); + + builder.addSelectionScrollInput(41, 80, (i, l) -> { + i.forOptions(Arrays.stream(ETrainFilter.values()).map(x -> TextUtils.translate(x.getValueTranslationKey(CreateRailwaysNavigator.MOD_ID))).toList()) + .titled(TextUtils.translate(ETrainFilter.ANY.getEnumTranslationKey(CreateRailwaysNavigator.MOD_ID))) + .addHint(TextUtils.translate(ETrainFilter.ANY.getEnumDescriptionTranslationKey(CreateRailwaysNavigator.MOD_ID))) + + ; + }, "TrainFilter"); + */ + + ModularGuiLineBuilderAccessor accessor = (ModularGuiLineBuilderAccessor)builder; + ResizableButton btn = new ResizableButton(accessor.crn$getX(), accessor.crn$getY() - 4, 121, 16, TextUtils.translate(CreateRailwaysNavigator.MOD_ID + ".schedule.instruction.configure"), + (b) -> { + if (Minecraft.getInstance().screen instanceof ScheduleScreen scheduleScreen) { + ((ScheduleScreenAccessor)scheduleScreen).crn$getOnEditorClose().accept(true); + builder.customArea(0, 0).speechBubble(); + Minecraft.getInstance().setScreen(new TrainSeparationSettingsScreen(scheduleScreen, condition.getData())); + } + }) { + @Override + public void renderButton(PoseStack poseStack, int mouseX, int mouseY, float partialTick) { + Graphics graphics = new Graphics(poseStack); + DynamicGuiRenderer.renderArea(graphics, x, y, width, height, AreaStyle.GRAY, isActive() ? (isFocused() || isMouseOver(mouseX, mouseY) ? ButtonState.SELECTED : ButtonState.BUTTON) : ButtonState.DISABLED); + int j = isActive() ? DragonLib.NATIVE_BUTTON_FONT_COLOR_ACTIVE : DragonLib.NATIVE_BUTTON_FONT_COLOR_DISABLED; + GuiUtils.drawString(graphics, Minecraft.getInstance().font, x + width / 2, y + (height - 8) / 2, this.getMessage(), j, EAlignment.CENTER, true); + } + }; + accessor.crn$getTarget().add(Pair.of(btn, "config_btn")); + } } diff --git a/common/src/main/java/de/mrjulsen/crn/client/ber/AdvancedDisplayRenderInstance.java b/common/src/main/java/de/mrjulsen/crn/client/ber/AdvancedDisplayRenderInstance.java index dc52bc28..63bec0c7 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/ber/AdvancedDisplayRenderInstance.java +++ b/common/src/main/java/de/mrjulsen/crn/client/ber/AdvancedDisplayRenderInstance.java @@ -9,6 +9,7 @@ import de.mrjulsen.crn.block.properties.ESide; import de.mrjulsen.crn.client.AdvancedDisplaysRegistry; import de.mrjulsen.crn.client.AdvancedDisplaysRegistry.DisplayTypeResourceKey; +import de.mrjulsen.crn.client.ber.variants.AbstractAdvancedDisplayRenderer; import de.mrjulsen.mcdragonlib.client.ber.AbstractBlockEntityRenderInstance; import de.mrjulsen.mcdragonlib.client.ber.BERGraphics; import de.mrjulsen.mcdragonlib.data.Pair; @@ -21,7 +22,7 @@ public class AdvancedDisplayRenderInstance extends AbstractBlockEntityRenderInstance { - public IBERRenderSubtype renderSubtype; + public AbstractAdvancedDisplayRenderer renderSubtype; private DisplayTypeResourceKey lastType; private int lastXSize = 0; @@ -32,7 +33,7 @@ public AdvancedDisplayRenderInstance(AdvancedDisplayBlockEntity blockEntity) { @Override public void render(BERGraphics graphics, float partialTick) { - if (!graphics.blockEntity().isController()) { + if (!graphics.blockEntity().isController() || renderSubtype == null) { return; } @@ -84,9 +85,9 @@ public void tick(Level level, BlockPos pos, BlockState state, AdvancedDisplayBlo @Override public void update(Level level, BlockPos pos, BlockState state, AdvancedDisplayBlockEntity blockEntity, Object data) { EUpdateReason reason = (EUpdateReason)data; - DisplayTypeResourceKey type = blockEntity.getDisplayTypeKey(); + DisplayTypeResourceKey type = blockEntity.getDisplayType(); if (lastType == null || !lastType.equals(type)) { - renderSubtype = AdvancedDisplaysRegistry.getRenderer(type); + renderSubtype = AdvancedDisplaysRegistry.createRenderer(type); } lastType = type; diff --git a/common/src/main/java/de/mrjulsen/crn/client/ber/TrainStationClockRenderer.java b/common/src/main/java/de/mrjulsen/crn/client/ber/TrainStationClockRenderer.java index 1045c129..12ba953b 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/ber/TrainStationClockRenderer.java +++ b/common/src/main/java/de/mrjulsen/crn/client/ber/TrainStationClockRenderer.java @@ -31,12 +31,12 @@ public void render(BERGraphics graphics, float par BERUtils.renderTexture(DIAL_TEXTURE, graphics, !graphics.blockEntity().isGlowing(), -7, -7, -0.2f, 14, 14, 0, 0, 1, 1, graphics.blockEntity().getBlockState().getValue(HorizontalDirectionalBlock.FACING), (0xFF << 24) | (graphics.blockEntity().getColor()), graphics.blockEntity().isGlowing() ? LightTexture.FULL_BRIGHT : graphics.packedLight()); graphics.poseStack().pushPose(); - graphics.poseStack().mulPose(Vector3f.ZP.rotationDegrees(-90 + ModUtils.clockHandDegrees(graphics.blockEntity().getLevel().getDayTime() + DragonLib.DAYTIME_SHIFT, 12000))); + graphics.poseStack().mulPose(Vector3f.ZP.rotationDegrees(-90 + ModUtils.clockHandDegrees(graphics.blockEntity().getLevel().getDayTime() + DragonLib.daytimeShift(), 12000))); BERUtils.fillColor(graphics, -0.5f, -0.5f, 0, 6, 1, 0xFF191919, graphics.blockEntity().getBlockState().getValue(HorizontalDirectionalBlock.FACING)); graphics.poseStack().popPose(); graphics.poseStack().pushPose(); - graphics.poseStack().mulPose(Vector3f.ZP.rotationDegrees(-90 + ModUtils.clockHandDegrees(graphics.blockEntity().getLevel().getDayTime() + DragonLib.DAYTIME_SHIFT, 1000))); + graphics.poseStack().mulPose(Vector3f.ZP.rotationDegrees(-90 + ModUtils.clockHandDegrees(graphics.blockEntity().getLevel().getDayTime() + DragonLib.daytimeShift(), 1000))); BERUtils.fillColor(graphics, -0.5f, -0.5f, 0.1f, 7, 1, 0xFF222222, graphics.blockEntity().getBlockState().getValue(HorizontalDirectionalBlock.FACING)); graphics.poseStack().popPose(); @@ -47,13 +47,13 @@ public void render(BERGraphics graphics, float par graphics.poseStack().popPose(); graphics.poseStack().pushPose(); - graphics.poseStack().mulPose(Vector3f.ZN.rotationDegrees(-90 + ModUtils.clockHandDegrees(graphics.blockEntity().getLevel().getDayTime() + DragonLib.DAYTIME_SHIFT, 12000))); + graphics.poseStack().mulPose(Vector3f.ZN.rotationDegrees(-90 + ModUtils.clockHandDegrees(graphics.blockEntity().getLevel().getDayTime() + DragonLib.daytimeShift(), 12000))); graphics.poseStack().mulPose(Vector3f.YP.rotationDegrees(180)); BERUtils.fillColor(graphics, -0.5f, -0.5f, 0, 6, 1, 0xFF191919, graphics.blockEntity().getBlockState().getValue(HorizontalDirectionalBlock.FACING)); graphics.poseStack().popPose(); graphics.poseStack().pushPose(); - graphics.poseStack().mulPose(Vector3f.ZN.rotationDegrees(-90 + ModUtils.clockHandDegrees(graphics.blockEntity().getLevel().getDayTime() + DragonLib.DAYTIME_SHIFT, 1000))); + graphics.poseStack().mulPose(Vector3f.ZN.rotationDegrees(-90 + ModUtils.clockHandDegrees(graphics.blockEntity().getLevel().getDayTime() + DragonLib.daytimeShift(), 1000))); graphics.poseStack().mulPose(Vector3f.YP.rotationDegrees(180)); BERUtils.fillColor(graphics, -0.5f, -0.5f, 0.1f, 7, 1, 0xFF222222, graphics.blockEntity().getBlockState().getValue(HorizontalDirectionalBlock.FACING)); graphics.poseStack().popPose(); diff --git a/common/src/main/java/de/mrjulsen/crn/client/ber/variants/AbstractAdvancedDisplayRenderer.java b/common/src/main/java/de/mrjulsen/crn/client/ber/variants/AbstractAdvancedDisplayRenderer.java new file mode 100644 index 00000000..62cab4a9 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/client/ber/variants/AbstractAdvancedDisplayRenderer.java @@ -0,0 +1,22 @@ +package de.mrjulsen.crn.client.ber.variants; + +import de.mrjulsen.crn.block.blockentity.AdvancedDisplayBlockEntity; +import de.mrjulsen.crn.block.display.properties.IDisplaySettings; +import de.mrjulsen.crn.client.ber.AdvancedDisplayRenderInstance; +import de.mrjulsen.crn.client.ber.IBERRenderSubtype; + +public interface AbstractAdvancedDisplayRenderer extends IBERRenderSubtype { + + public static final int DARK_FONT_COLOR = 0xFF111111; + public static final int LIGHT_FONT_COLOR = 0xFFEEEEEE; + + @SuppressWarnings("unchecked") + default T getDisplaySettings(AdvancedDisplayBlockEntity blockEntity) { + try { + return (T)blockEntity.getSettings(); + } catch (ClassCastException e) { + throw new IllegalArgumentException("Could not get display data of display at " + blockEntity.getBlockPos(), e); + } + } + +} diff --git a/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERDepartureBoardTable.java b/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERDepartureBoardTable.java new file mode 100644 index 00000000..d76f1428 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERDepartureBoardTable.java @@ -0,0 +1,487 @@ +package de.mrjulsen.crn.client.ber.variants; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import de.mrjulsen.crn.CreateRailwaysNavigator; +import de.mrjulsen.crn.block.blockentity.AdvancedDisplayBlockEntity; +import de.mrjulsen.crn.block.blockentity.AdvancedDisplayBlockEntity.EUpdateReason; +import de.mrjulsen.crn.block.properties.ETimeDisplay; +import de.mrjulsen.crn.block.display.properties.DepartureBoardDisplayTableSettings; +import de.mrjulsen.crn.client.ber.AdvancedDisplayRenderInstance; +import de.mrjulsen.crn.client.lang.CustomLanguage; +import de.mrjulsen.crn.config.ModClientConfig; +import de.mrjulsen.crn.data.train.TrainStatus.CompiledTrainStatus; +import de.mrjulsen.crn.data.train.portable.StationDisplayData; +import de.mrjulsen.crn.util.ModUtils; +import de.mrjulsen.mcdragonlib.DragonLib; +import de.mrjulsen.mcdragonlib.client.ber.BERGraphics; +import de.mrjulsen.mcdragonlib.client.ber.BERLabel; +import de.mrjulsen.mcdragonlib.client.ber.BERLabel.BoundsHitReaction; +import de.mrjulsen.mcdragonlib.client.util.BERUtils; +import de.mrjulsen.mcdragonlib.util.ColorUtils; +import de.mrjulsen.mcdragonlib.util.DLUtils; +import de.mrjulsen.mcdragonlib.util.TextUtils; +import de.mrjulsen.mcdragonlib.util.TimeUtils; +import net.minecraft.ChatFormatting; +import net.minecraft.core.BlockPos; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.MutableComponent; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.HorizontalDirectionalBlock; +import net.minecraft.world.level.block.state.BlockState; + +public class BERDepartureBoardTable implements AbstractAdvancedDisplayRenderer { + + private static final String keyDeparture = "gui.createrailwaysnavigator.departure"; + private static final String keyTrain = "gui.createrailwaysnavigator.line"; + private static final String keyDestination = "gui.createrailwaysnavigator.destination"; + private static final String keyPlatform = "gui.createrailwaysnavigator.platform"; + private static final String keyVia = "gui.createrailwaysnavigator.via"; + private static final String keyTooSmall = "gui.createrailwaysnavigator.too_small"; + + private static final int MIN_SIZE = 4; + private static final float LINE_HEIGHT = 5.4f; + private static final float Y_OFFSET = LINE_HEIGHT; // Headline + private static final float SPACING = 2; + private static final float TIME_LABEL_MAX_WIDTH = 12; + private static final float REAL_TIME_LABEL_MAX_WIDTH = 12; + + private boolean showInfoLine = false; + private MutableComponent infoLineText = TextUtils.empty(); + private int maxLines = 0; + + private final BERLabel statusLabel = new BERLabel(TextUtils.empty()) + .setCentered(true) + .setScale(0.4f, 0.4f) + .setYScale(0.4f) + .setColor(0xFF111111) + .setBackground(0xFFFFFFFF, true) + .setScrollingSpeed(2) + ; + private final BERLabel tooSmallLabel = new BERLabel(TextUtils.translate(keyTooSmall)) // TODO + .setCentered(false) + .setScale(0.4f, 0.4f) + .setYScale(0.4f) + .setPos(3, 3) + ; + private BERLabel[][] lines = new BERLabel[0][]; + + private final BERLabel[] headlines; + { + headlines = new BERLabel[LineComponent.values().length]; + + headlines[LineComponent.TIME.i()] = new BERLabel() + .setText(CustomLanguage.translate(keyDeparture).withStyle(ChatFormatting.BOLD).withStyle(ChatFormatting.ITALIC)) + .setYScale(0.4f) + .setMaxWidth(12.5f, BoundsHitReaction.SCALE_SCROLL) + .setScale(0.4f, 0.2f) + .setPos(0, 3) + .setMaxWidth(0, BoundsHitReaction.CUT_OFF) + ; + headlines[LineComponent.TRAIN_NAME.i()] = new BERLabel() + .setText(CustomLanguage.translate(keyTrain).withStyle(ChatFormatting.BOLD).withStyle(ChatFormatting.ITALIC)) + .setYScale(0.4f) + .setScrollingSpeed(2) + .setMaxWidth(14, BoundsHitReaction.SCALE_SCROLL) + .setScale(0.4f, 0.2f) + .setPos(0, 3) + .setMaxWidth(0, BoundsHitReaction.CUT_OFF) + ; + + headlines[LineComponent.PLATFORM.i()] = new BERLabel() + .setText(CustomLanguage.translate(keyPlatform).withStyle(ChatFormatting.BOLD).withStyle(ChatFormatting.ITALIC)) + .setYScale(0.4f) + .setScale(0.4f, 0.2f) + .setPos(0, 3) + .setMaxWidth(0, BoundsHitReaction.CUT_OFF) + ; + + headlines[LineComponent.DESTINATION.i()] = new BERLabel() + .setText(CustomLanguage.translate(keyDestination).withStyle(ChatFormatting.BOLD).withStyle(ChatFormatting.ITALIC)) + .setYScale(0.4f) + .setScrollingSpeed(2) + .setScale(0.4f, 0.2f) + .setPos(0, 3) + .setMaxWidth(0, BoundsHitReaction.CUT_OFF) + ; + headlines[LineComponent.STOPOVERS.i()] = new BERLabel() + .setText(CustomLanguage.translate(keyVia).withStyle(ChatFormatting.BOLD).withStyle(ChatFormatting.ITALIC)) + .setYScale(0.4f) + .setScrollingSpeed(2) + .setScale(0.4f, 0.2f) + .setPos(0, 3) + .setMaxWidth(0, BoundsHitReaction.CUT_OFF) + ; + headlines[LineComponent.INFO.i()] = new BERLabel() + .setText(TextUtils.empty()) + .setPos(0, 3) + .setMaxWidth(0, BoundsHitReaction.CUT_OFF) + ; + } + + @Override + public void renderTick(float deltaTime) { + statusLabel.renderTick(); + DLUtils.doIfNotNull(lines, x -> { + for (int i = 0; i < x.length; i++) { + BERLabel[] line = x[i]; + if (line == null) continue; + for (int k = 0; k < line.length; k++) { + DLUtils.doIfNotNull(line[k], y -> y.renderTick()); + } + } + }); + for (int k = 0; k < headlines.length; k++) { + DLUtils.doIfNotNull(headlines[k], y -> y.renderTick()); + } + } + + @Override + public void render(BERGraphics graphics, float pPartialTicks, AdvancedDisplayRenderInstance parent, int light, boolean backSide) { + + BERUtils.fillColor(graphics, 2, 1.5f + LINE_HEIGHT, 0.0f, graphics.blockEntity().getXSizeScaled() * 16 - 4, 0.25f, (0xFF << 24) | (getDisplaySettings(graphics.blockEntity()).getFontColor() & 0x00FFFFFF), graphics.blockEntity().getBlockState().getValue(HorizontalDirectionalBlock.FACING), light); + if (graphics.blockEntity().getXSizeScaled() < MIN_SIZE) { + tooSmallLabel.render(graphics, light); + return; + } + + for (int k = 0; k < headlines.length; k++) { + DLUtils.doIfNotNull(headlines[k], y -> y.render(graphics, light)); + } + + for (int i = 0; i < lines.length && i < maxLines; i++) { + graphics.poseStack().pushPose(); + if (i % 2 == 1) { + BERUtils.fillColor(graphics, 2, 2 + Y_OFFSET + i * LINE_HEIGHT, 0, graphics.blockEntity().getXSizeScaled() * 16 - 4, LINE_HEIGHT, (0x40 << 24) | (getDisplaySettings(graphics.blockEntity()).getFontColor() & 0x00FFFFFF), graphics.blockEntity().getBlockState().getValue(HorizontalDirectionalBlock.FACING)); + graphics.poseStack().translate(0, 0, 0.05f); + } + for (int k = 0; k < lines[i].length; k++) { + DLUtils.doIfNotNull(lines[i][k], x -> x.render(graphics, light)); + } + graphics.poseStack().popPose(); + } + + if (showInfoLine) { + statusLabel.render(graphics, light); + } + } + + private Collection getStatusInfo(AdvancedDisplayBlockEntity blockEntity, StationDisplayData data) { + if (!data.getTrainData().hasStatusInfo() && !data.getStationData().isDepartureDelayed()) { + return List.of(); + } + Collection content = new ArrayList<>(); + if (data.getTrainData().isCancelled()) { + content.add(CustomLanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.information_about_cancelled", data.getTrainData().getName())); + return content; + } + String delay = getDisplaySettings(blockEntity).getTimeDisplay() == ETimeDisplay.ETA ? ModUtils.timeRemainingString(data.getStationData().getDepartureTimeDeviation()) : String.valueOf(TimeUtils.formatToMinutes(data.getStationData().getDepartureTimeDeviation())); + MutableComponent delayComponent = CustomLanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.information_about_delayed", data.getTrainData().getName(), delay); + if (getDisplaySettings(blockEntity).getTimeDisplay() == ETimeDisplay.ABS) { + delayComponent.append(" ").append(CustomLanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.delay_abs_suffix")); + } + content.add(delayComponent); + for (CompiledTrainStatus status : data.getTrainData().getStatus()) { + content.add(status.text()); + } + return content; + } + + @Override + public void update(Level level, BlockPos pos, BlockState state, AdvancedDisplayBlockEntity blockEntity, AdvancedDisplayRenderInstance parent, EUpdateReason reason) { + List preds = blockEntity.getStops().stream().filter(x -> { + return (!x.isNextSectionExcluded() || getDisplaySettings(blockEntity).showArrival()) && (!x.getTrainData().isCancelled() || DragonLib.getCurrentWorldTime() < x.getStationData().getScheduledDepartureTime() + ModClientConfig.DISPLAY_LEAD_TIME.get()); + }).toList(); + + showInfoLine = !preds.isEmpty() && preds.get(0).getStationData().isDepartureDelayed() && preds.get(0).getTrainData().hasStatusInfo(); + if (showInfoLine) { + // Update status label + this.infoLineText = TextUtils.concat(TextUtils.text(" +++ "), preds.stream().limit(maxLines).filter(x -> x.getTrainData().hasStatusInfo() && x.getStationData().isDepartureDelayed()).flatMap(x -> { + return getStatusInfo(blockEntity, x).stream(); + }).toArray(Component[]::new)); + } else { + infoLineText = TextUtils.empty(); + } + + int defaultMaxLines = blockEntity.getYSizeScaled() * 3 - 2; + this.maxLines = defaultMaxLines - (showInfoLine ? 1 : 0); + int maxIndices = Math.max(0, Math.min(this.maxLines, preds.size())); + if (reason == EUpdateReason.LAYOUT_CHANGED || this.lines == null || lines.length != maxIndices) { + updateLayout(blockEntity, preds, maxIndices); + } + + for (int i = 0; i < this.lines.length && i < preds.size(); i++) { + StationDisplayData stop = preds.get(i); + updateContent(blockEntity, stop, i, false, 0, 0, 0); + } + + statusLabel + .setText(infoLineText) + .setPos(3, blockEntity.getYSizeScaled() * 16 - 12 * statusLabel.getYScale() - 2) + .setMaxWidth(blockEntity.getXSizeScaled() * 16 - 6, BoundsHitReaction.SCALE_SCROLL) + .setColor(ColorUtils.brightnessDependingFontColor(getDisplaySettings(blockEntity).getFontColor(), LIGHT_FONT_COLOR, DARK_FONT_COLOR)) + ; + } + + + private void updateLayout(AdvancedDisplayBlockEntity blockEntity, List preds, int maxIndices) { + DepartureBoardDisplayTableSettings settings = getDisplaySettings(blockEntity); + + if (blockEntity.getXSizeScaled() < MIN_SIZE) { + tooSmallLabel + .setMaxWidth(blockEntity.getXSizeScaled() * 16 - 6, BoundsHitReaction.CUT_OFF) + .setColor((0xFF << 24) | (settings.getFontColor() & 0x00FFFFFF)) + ; + return; + } + + boolean hasStopovers = blockEntity.getXSizeScaled() - 4 >= 4; + boolean hasInfo = blockEntity.getXSizeScaled() - 4 >= 7; + + // Init headline + BERLabel hTimeLabel = headlines[LineComponent.TIME.i()]; + hTimeLabel + .setPos(3, hTimeLabel.getY()) + .setMaxWidth(TIME_LABEL_MAX_WIDTH + (!isSmall(blockEntity) ? REAL_TIME_LABEL_MAX_WIDTH : 0) + SPACING, BoundsHitReaction.CUT_OFF) + .setColor((0xFF << 24) | (settings.getFontColor() & 0x00FFFFFF)) + ; + BERLabel hTrainLabel = headlines[LineComponent.TRAIN_NAME.i()]; + hTrainLabel + .setPos(hTimeLabel.getX() + hTimeLabel.getMaxWidth() + SPACING, hTrainLabel.getY()) + .setMaxWidth(settings.getTrainNameWidth(), BoundsHitReaction.CUT_OFF) + .setColor((0xFF << 24) | (settings.getFontColor() & 0x00FFFFFF)) + ; + BERLabel hPlatformLabel = headlines[LineComponent.PLATFORM.i()]; + float hPlatformLabelWidth = settings.getPlatformWidth(); + hPlatformLabel + .setPos(blockEntity.getXSizeScaled() * 16 - 3 - Math.min(hPlatformLabelWidth, hPlatformLabel.getTextWidth()), hPlatformLabel.getY()) + .setMaxWidth(hPlatformLabelWidth, BoundsHitReaction.CUT_OFF) + .setColor((0xFF << 24) | (settings.getFontColor() & 0x00FFFFFF)) + ; + + final float remainingSpace = blockEntity.getXSizeScaled() * 16 - 3 - hTrainLabel.getX() - hTrainLabel.getMaxWidth() - settings.getPlatformWidth() - SPACING; // No *2! + final float infoSpace = hasInfo ? (remainingSpace * settings.getInfoWidthPercentage()) - SPACING : 0; + final float stopoversSpace = hasStopovers ? (remainingSpace * settings.getStopoversWidthPercentage()) - SPACING : 0; + final float destinationSpace = remainingSpace - infoSpace - stopoversSpace - SPACING * 3; + + BERLabel hStopoversLabel = headlines[LineComponent.STOPOVERS.i()]; + hStopoversLabel + .setPos(hasStopovers ? hTrainLabel.getX() + hTrainLabel.getMaxWidth() + SPACING : 0, hStopoversLabel.getY()) + .setMaxWidth(hasStopovers ? stopoversSpace : 0, BoundsHitReaction.CUT_OFF) + .setColor((0xFF << 24) | (settings.getFontColor() & 0x00FFFFFF)) + ; + BERLabel hDestinationLabel = headlines[LineComponent.DESTINATION.i()]; + hDestinationLabel + .setPos(hasStopovers ? hStopoversLabel.getX() + hStopoversLabel.getMaxWidth() + SPACING : hTrainLabel.getX() + hTrainLabel.getMaxWidth() + SPACING, hDestinationLabel.getY()) + .setMaxWidth(Math.min(hDestinationLabel.getX() + (destinationSpace), blockEntity.getXSizeScaled() * 16 - 3 - hPlatformLabel.getTextWidth() - SPACING) - hDestinationLabel.getX(), BoundsHitReaction.CUT_OFF) + .setColor((0xFF << 24) | (settings.getFontColor() & 0x00FFFFFF)) + ; + BERLabel hInfoLabel = headlines[LineComponent.INFO.i()]; + hInfoLabel + .setPos(hasInfo ? hDestinationLabel.getX() + hDestinationLabel.getMaxWidth() + SPACING : 0, hDestinationLabel.getY()) + .setMaxWidth(hasInfo ? Math.min(hInfoLabel.getX() + (infoSpace - SPACING), blockEntity.getXSizeScaled() * 16 - 3 - hInfoLabel.getX() - hPlatformLabel.getTextWidth() - SPACING) - hInfoLabel.getX() : 0, BoundsHitReaction.CUT_OFF) + .setColor((0xFF << 24) | (settings.getFontColor() & 0x00FFFFFF)) + ; + + + + this.lines = new BERLabel[maxIndices][]; + for (int i = 0; i < this.lines.length; i++) { + StationDisplayData stop = preds.get(i); + this.lines[i] = createLine(blockEntity, stop, i, hasStopovers, hasInfo); + updateContent(blockEntity, stop, i, true, stopoversSpace, infoSpace, destinationSpace); + } + statusLabel + .setBackground((0xFF << 24) | (settings.getFontColor() & 0x00FFFFFF), true) + .setColor(ColorUtils.brightnessDependingFontColor(settings.getFontColor(), LIGHT_FONT_COLOR, DARK_FONT_COLOR)) + ; + + } + + private void updateContent(AdvancedDisplayBlockEntity blockEntity, StationDisplayData stop, int index, boolean layoutUpdate, float stopoversSize, float infoLineWidth, float destinationWidth) { + DepartureBoardDisplayTableSettings settings = getDisplaySettings(blockEntity); + boolean isLast = settings.showArrival() && stop.isLastStop(); + boolean showInfoLine = stop.getStationData().isDepartureDelayed() && stop.getTrainData().hasStatusInfo(); + + BERLabel[] components = lines[index]; + + BERLabel timeLabel = components[LineComponent.TIME.i()] + .setText(TextUtils.text(ModUtils.formatTime(stop.getScheduledTime(), settings.getTimeDisplay() == ETimeDisplay.ETA))) + ; + BERLabel realTimeLabel = components[LineComponent.REAL_TIME.i()] + .setText(isSmall(blockEntity) ? + TextUtils.text(ModUtils.formatTime(stop.getScheduledTime(), settings.getTimeDisplay() == ETimeDisplay.ETA)) : + TextUtils.text(stop.getTrainData().isCancelled() ? + " \u274C " : // X + (stop.getStationData().isDepartureDelayed() ? + (ModUtils.formatTime(stop.getRealTime(), settings.getTimeDisplay() == ETimeDisplay.ETA)) : + ""))) // Nothing (not delayed) + .setColor(ColorUtils.brightnessDependingFontColor(settings.getFontColor(), LIGHT_FONT_COLOR, DARK_FONT_COLOR)) + ; + BERLabel trainLabel = components[LineComponent.TRAIN_NAME.i()] + .setText(TextUtils.text(stop.getTrainData().getName())) + ; + + if (settings.showLineColor() && stop.getTrainData().hasColor()) { + trainLabel + .setBackground((0xFF << 24) | (stop.getTrainData().getColor() & 0x00FFFFFF), false) + .setColor(ColorUtils.brightnessDependingFontColor(stop.getTrainData().getColor(), LIGHT_FONT_COLOR, DARK_FONT_COLOR)) + ; + } else { + trainLabel + .setBackground(0, false) + .setColor((0xFF << 24) | (settings.getFontColor() & 0x00FFFFFF)) + ; + } + + BERLabel destinationLabel = components[LineComponent.DESTINATION.i()] + .setText(isLast ? + CustomLanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".schedule_board.train_from", stop.getFirstStopName()) : + TextUtils.text(stop.getStationData().getDestination())) + ; + BERLabel stopoversLabel; + BERLabel infoLabel; + boolean hasTransfers = (stopoversLabel = components[LineComponent.STOPOVERS.i()]) != null; + boolean hasInfo = (infoLabel = components[LineComponent.INFO.i()]) != null; + if (hasTransfers) { + stopoversLabel + .setText(isLast ? + TextUtils.empty() : + TextUtils.concat(TextUtils.text(" \u25CF "), stop.getStopovers().stream().map(a -> (Component)TextUtils.text(a)).toList()) + ) + ; + } + if (hasInfo) { + infoLabel + .setText(showInfoLine ? TextUtils.concat(TextUtils.text(" +++ "), getStatusInfo(blockEntity, stop)) : TextUtils.empty()) + .setColor(ColorUtils.brightnessDependingFontColor(settings.getFontColor(), LIGHT_FONT_COLOR, DARK_FONT_COLOR)) + ; + } + BERLabel platformLabel = components[LineComponent.PLATFORM.i()] + .setText(blockEntity.isPlatformFixed() ? + TextUtils.empty() : + TextUtils.text(stop.getStationData().getStationInfo().platform())) + ; + + + if (layoutUpdate) { + platformLabel + .setMaxWidth(settings.getPlatformWidth(), BoundsHitReaction.SCALE_SCROLL) + ; + timeLabel + .setPos(headlines[LineComponent.TIME.i()].getX(), Y_OFFSET + 3 + index * LINE_HEIGHT) + ; + realTimeLabel + .setPos(timeLabel.getX() + timeLabel.getMaxWidth() + SPACING, Y_OFFSET + 3 + index * LINE_HEIGHT) + ; + trainLabel + .setPos(headlines[LineComponent.TRAIN_NAME.i()].getX(), Y_OFFSET + 3 + index * LINE_HEIGHT) + ; + destinationLabel + .setPos(headlines[LineComponent.DESTINATION.i()].getX(), Y_OFFSET + 3 + index * LINE_HEIGHT) + .setMaxWidth(destinationWidth, BoundsHitReaction.SCALE_SCROLL) + ; + platformLabel + .setPos(blockEntity.getXSizeScaled() * 16 - 3 - platformLabel.getTextWidth(), Y_OFFSET + 3 + index * LINE_HEIGHT) + ; + if (hasTransfers) { + stopoversLabel + .setPos(hasTransfers ? headlines[LineComponent.STOPOVERS.i()].getX() : 0, Y_OFFSET + 3 + index * LINE_HEIGHT + 0.5f) + .setMaxWidth(hasTransfers ? stopoversSize : 0, BoundsHitReaction.SCALE_SCROLL) + ; + } + if (hasInfo) { + infoLabel + .setPos(showInfoLine ? headlines[LineComponent.INFO.i()].getX() : 0, Y_OFFSET + 3 + index * LINE_HEIGHT) + .setMaxWidth(showInfoLine ? infoLineWidth : 0, BoundsHitReaction.SCALE_SCROLL) + ; + } + } + } + + private BERLabel[] createLine(AdvancedDisplayBlockEntity blockEntity, StationDisplayData stop, int index, boolean withStopovers, boolean withInfo) { + BERLabel[] components = new BERLabel[LineComponent.values().length]; + boolean isSmall = isSmall(blockEntity); + + components[LineComponent.TIME.i()] = new BERLabel() + .setYScale(0.4f) + .setMaxWidth(isSmall ? -2 : TIME_LABEL_MAX_WIDTH, BoundsHitReaction.SCALE_SCROLL) + .setScale(0.4f, 0.2f) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) + ; + components[LineComponent.REAL_TIME.i()] = new BERLabel() + .setYScale(0.4f) + .setMaxWidth(REAL_TIME_LABEL_MAX_WIDTH, BoundsHitReaction.SCALE_SCROLL) + .setScale(0.4f, 0.2f) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) + ; + if (!isSmall) { + components[LineComponent.REAL_TIME.i()] + .setBackground((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF), false) + .setColor(0xFF111111) + ; + } + components[LineComponent.TRAIN_NAME.i()] = new BERLabel() + .setYScale(0.4f) + .setScrollingSpeed(2) + .setMaxWidth(getDisplaySettings(blockEntity).getTrainNameWidth(), BoundsHitReaction.SCALE_SCROLL) + .setScale(0.4f, 0.2f) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) + ; + components[LineComponent.PLATFORM.i()] = new BERLabel() + .setYScale(0.4f) + .setScale(0.4f, 0.2f) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) + ; + components[LineComponent.DESTINATION.i()] = new BERLabel() + .setYScale(0.4f) + .setScrollingSpeed(2) + .setScale(0.4f, 0.2f) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) + ; + + if (withStopovers) { + components[LineComponent.STOPOVERS.i()] = new BERLabel() + .setYScale(0.3f) + .setScrollingSpeed(2) + .setScale(0.3f, 0.2f) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) + ; + } + if (withInfo) { + components[LineComponent.INFO.i()] = new BERLabel() + .setYScale(0.4f) + .setScrollingSpeed(2) + .setScale(0.4f, 0.2f) + .setColor(0xFF111111) + .setBackground((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF), true) + ; + } + + return components; + } + + private boolean isSmall(AdvancedDisplayBlockEntity blockEntity) { + return blockEntity.getXSizeScaled() <= MIN_SIZE; + } + + private static enum LineComponent { + TIME(0), + REAL_TIME(1), + TRAIN_NAME(2), + DESTINATION(3), + PLATFORM(4), + STOPOVERS(5), + INFO(6); + + int index; + LineComponent(int index) { + this.index = index; + } + public int i() { + return index; + } + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERError.java b/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERError.java index 9a8af342..6da08faa 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERError.java +++ b/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERError.java @@ -2,8 +2,8 @@ import de.mrjulsen.crn.block.blockentity.AdvancedDisplayBlockEntity; import de.mrjulsen.crn.block.blockentity.AdvancedDisplayBlockEntity.EUpdateReason; +import de.mrjulsen.crn.block.display.properties.BasicDisplaySettings; import de.mrjulsen.crn.client.ber.AdvancedDisplayRenderInstance; -import de.mrjulsen.crn.client.ber.IBERRenderSubtype; import de.mrjulsen.mcdragonlib.client.ber.BERGraphics; import de.mrjulsen.mcdragonlib.client.ber.BERLabel; import de.mrjulsen.mcdragonlib.client.ber.BERLabel.BoundsHitReaction; @@ -12,7 +12,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; -public class BERError implements IBERRenderSubtype { +public class BERError implements AbstractAdvancedDisplayRenderer { private final BERLabel label = new BERLabel() .setPos(3, 3) diff --git a/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERPassengerInfoInformative.java b/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERPassengerInfoInformative.java index 82449018..ae481b8b 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERPassengerInfoInformative.java +++ b/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERPassengerInfoInformative.java @@ -4,12 +4,12 @@ import de.mrjulsen.crn.CreateRailwaysNavigator; import de.mrjulsen.crn.block.blockentity.AdvancedDisplayBlockEntity; import de.mrjulsen.crn.block.blockentity.AdvancedDisplayBlockEntity.EUpdateReason; -import de.mrjulsen.crn.block.display.AdvancedDisplaySource.ETimeDisplay; +import de.mrjulsen.crn.block.properties.ETimeDisplay; +import de.mrjulsen.crn.block.display.properties.PassengerInformationDetailedSettings; import de.mrjulsen.crn.client.CRNGui; import de.mrjulsen.crn.client.ber.AdvancedDisplayRenderInstance; -import de.mrjulsen.crn.client.ber.IBERRenderSubtype; import de.mrjulsen.crn.client.gui.ModGuiIcons; -import de.mrjulsen.crn.client.lang.ELanguage; +import de.mrjulsen.crn.client.lang.CustomLanguage; import de.mrjulsen.crn.config.ModClientConfig; import de.mrjulsen.crn.data.TrainExitSide; import de.mrjulsen.crn.data.train.portable.NextConnectionsDisplayData; @@ -33,7 +33,7 @@ import net.minecraft.world.level.block.HorizontalDirectionalBlock; import net.minecraft.world.level.block.state.BlockState; -public class BERPassengerInfoInformative implements IBERRenderSubtype { +public class BERPassengerInfoInformative implements AbstractAdvancedDisplayRenderer { private static final ResourceLocation CARRIAGE_ICON = new ResourceLocation("create:textures/gui/assemble.png"); private static final ResourceLocation ICONS = new ResourceLocation(CreateRailwaysNavigator.MOD_ID, "textures/gui/icons.png"); @@ -77,7 +77,7 @@ public class BERPassengerInfoInformative implements IBERRenderSubtype 1 && !nextStopAnnounced ? TextUtils.text(ModUtils.formatTime(DragonLib.getCurrentWorldTime(), blockEntity.getTimeDisplay() == ETimeDisplay.ETA)).withStyle(ChatFormatting.BOLD) : TextUtils.empty()) + .setText(blockEntity.getXSizeScaled() > 1 && !nextStopAnnounced ? TextUtils.text(ModUtils.formatTime(DragonLib.getCurrentWorldTime(), false)).withStyle(ChatFormatting.BOLD) : TextUtils.empty()) .setPos(blockEntity.getXSizeScaled() * 16 - 3 - timeLabel.getTextWidth() - (this.exitSide != TrainExitSide.UNKNOWN ? 4 : 0), 2.5f) - .setColor((0xFF << 24) | (blockEntity.getColor() & 0x00FFFFFF)) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) ; } @@ -176,7 +176,7 @@ public void renderHeader(BERGraphics graphics, float uv255 * (227 + 10), uv255 * (19 + 10), graphics.blockEntity().getBlockState().getValue(HorizontalDirectionalBlock.FACING), - (0xFF << 24) | (graphics.blockEntity().getColor() & 0x00FFFFFF), + (0xFF << 24) | (getDisplaySettings(graphics.blockEntity()).getFontColor() & 0x00FFFFFF), light ); } @@ -205,7 +205,7 @@ public void renderHeader(BERGraphics graphics, float uv255 * (22 + 13), uv255 * (231 + 5), graphics.blockEntity().getBlockState().getValue(HorizontalDirectionalBlock.FACING), - (0xFF << 24) | (graphics.blockEntity().getColor() & 0x00FFFFFF), + (0xFF << 24) | (getDisplaySettings(graphics.blockEntity()).getFontColor() & 0x00FFFFFF), light ); } @@ -228,7 +228,7 @@ public void renderHeader(BERGraphics graphics, float uv255 * (ModGuiIcons.ARROW_RIGHT.getU() + ModGuiIcons.ICON_SIZE), uv255 * (ModGuiIcons.ARROW_RIGHT.getV() + ModGuiIcons.ICON_SIZE), graphics.blockEntity().getBlockState().getValue(HorizontalDirectionalBlock.FACING), - (0xFF << 24) | (graphics.blockEntity().getColor()), + (0xFF << 24) | (getDisplaySettings(graphics.blockEntity()).getFontColor()), light ); break; @@ -247,7 +247,7 @@ public void renderHeader(BERGraphics graphics, float uv255 * (ModGuiIcons.ARROW_LEFT.getU() + ModGuiIcons.ICON_SIZE), uv255 * (ModGuiIcons.ARROW_LEFT.getV() + ModGuiIcons.ICON_SIZE), graphics.blockEntity().getBlockState().getValue(HorizontalDirectionalBlock.FACING), - (0xFF << 24) | (graphics.blockEntity().getColor()), + (0xFF << 24) | (getDisplaySettings(graphics.blockEntity()).getFontColor()), light ); break; @@ -261,7 +261,7 @@ public void renderHeader(BERGraphics graphics, float public void render(BERGraphics graphics, float partialTick, AdvancedDisplayRenderInstance parent, int light, boolean backSide) { final float uv255 = 1f / 256f; renderHeader(graphics, partialTick, parent, light, backSide); - BERUtils.fillColor(graphics, 2.5f, 5.0f, 0.01f, graphics.blockEntity().getXSizeScaled() * 16 - 5, 0.25f, (0xFF << 24) | (graphics.blockEntity().getColor() & 0x00FFFFFF), graphics.blockEntity().getBlockState().getValue(HorizontalDirectionalBlock.FACING), light); + BERUtils.fillColor(graphics, 2.5f, 5.0f, 0.01f, graphics.blockEntity().getXSizeScaled() * 16 - 5, 0.25f, (0xFF << 24) | (getDisplaySettings(graphics.blockEntity()).getFontColor() & 0x00FFFFFF), graphics.blockEntity().getBlockState().getValue(HorizontalDirectionalBlock.FACING), light); if (graphics.blockEntity().getTrainData() == null || graphics.blockEntity().getTrainData().isEmpty()) { return; @@ -279,7 +279,7 @@ public void render(BERGraphics graphics, float parti }); nextConnectionsTitleLabel.render(graphics, light); pageIndicatorLabel.render(graphics, light); - } else if (DragonLib.getCurrentWorldTime() % 500 < 200 && !graphics.blockEntity().getTrainData().isWaitingAtStation()) { + } else if (getDisplaySettings(graphics.blockEntity()).showStats() && DragonLib.getCurrentWorldTime() % 500 < 200 && !graphics.blockEntity().getTrainData().isWaitingAtStation()) { // render stats speedLabel.render(graphics, light); dateLabel.render(graphics, light); @@ -298,7 +298,7 @@ public void render(BERGraphics graphics, float parti uv255 * (22 + 13), uv255 * (231 + 5), graphics.blockEntity().getBlockState().getValue(HorizontalDirectionalBlock.FACING), - (0xFF << 24) | (graphics.blockEntity().getColor() & 0x00FFFFFF), + (0xFF << 24) | (getDisplaySettings(graphics.blockEntity()).getFontColor() & 0x00FFFFFF), light ); } else { @@ -327,7 +327,7 @@ public void render(BERGraphics graphics, float parti uv32 * (21 + 7), uv32 * (30 + 14), graphics.blockEntity().getBlockState().getValue(HorizontalDirectionalBlock.FACING), - (0xFF << 24) | (graphics.blockEntity().getColor() & 0x00FFFFFF), + (0xFF << 24) | (getDisplaySettings(graphics.blockEntity()).getFontColor() & 0x00FFFFFF), light ); } else if (idx >= MAX_LINES - 1) { @@ -345,7 +345,7 @@ public void render(BERGraphics graphics, float parti uv32 * (35 + 7), uv32 * (30 + 14), graphics.blockEntity().getBlockState().getValue(HorizontalDirectionalBlock.FACING), - (0xFF << 24) | (graphics.blockEntity().getColor() & 0x00FFFFFF), + (0xFF << 24) | (getDisplaySettings(graphics.blockEntity()).getFontColor() & 0x00FFFFFF), light ); } else { @@ -363,7 +363,7 @@ public void render(BERGraphics graphics, float parti uv32 * (28 + 7), uv32 * (30 + 14), graphics.blockEntity().getBlockState().getValue(HorizontalDirectionalBlock.FACING), - (0xFF << 24) | (graphics.blockEntity().getColor() & 0x00FFFFFF), + (0xFF << 24) | (getDisplaySettings(graphics.blockEntity()).getFontColor() & 0x00FFFFFF), light ); } @@ -382,9 +382,9 @@ public void update(Level level, BlockPos pos, BlockState state, AdvancedDisplayB TrainDisplayData data = blockEntity.getTrainData(); boolean wasNextStopAnnounced = nextStopAnnounced; nextStopAnnounced = !data.isWaitingAtStation() && data.getNextStop().isPresent() && data.getNextStop().get().getRealTimeArrivalTime() - DragonLib.getCurrentWorldTime() < ModClientConfig.NEXT_STOP_ANNOUNCEMENT.get(); - this.exitSide = !nextStopAnnounced && !data.isWaitingAtStation() ? TrainExitSide.UNKNOWN : (data.isWaitingAtStation() ? exitSide : blockEntity.relativeExitDirection.get()); + this.exitSide = (!nextStopAnnounced && !data.isWaitingAtStation()) || !getDisplaySettings(blockEntity).showExit() ? TrainExitSide.UNKNOWN : (data.isWaitingAtStation() ? exitSide : blockEntity.relativeExitDirection.get()); - if (blockEntity.getXSizeScaled() > 1 && nextStopAnnounced && !wasNextStopAnnounced && data.getNextStop().isPresent()) { + if (getDisplaySettings(blockEntity).showConnections() && blockEntity.getXSizeScaled() > 1 && nextStopAnnounced && !wasNextStopAnnounced && data.getNextStop().isPresent()) { DataAccessor.getFromServer(new NextConnectionsRequestData(data.getNextStop().get().getName(), data.getTrainData().getId()), ModAccessorTypes.GET_NEXT_CONNECTIONS_DISPLAY_DATA, (res) -> { nextConnections = res; updateLayout(blockEntity, data); @@ -399,36 +399,43 @@ public void update(Level level, BlockPos pos, BlockState state, AdvancedDisplayB updateContent(blockEntity, data); } - private void updateContent(AdvancedDisplayBlockEntity blockEntity, TrainDisplayData data) { + private int getCarriageIndex(AdvancedDisplayBlockEntity blockEntity) { + PassengerInformationDetailedSettings settings = getDisplaySettings(blockEntity); + return (settings.shouldOverwriteCarriageIndex() ? 0 : blockEntity.getCarriageData().index() + 1) + settings.getCarriageIndex(); + } + + private void updateContent(AdvancedDisplayBlockEntity blockEntity, TrainDisplayData data) { + PassengerInformationDetailedSettings settings = getDisplaySettings(blockEntity); + int carriageIndex = getCarriageIndex(blockEntity); timeLabel - .setText(blockEntity.getXSizeScaled() > 1 && !nextStopAnnounced ? TextUtils.text(ModUtils.formatTime(DragonLib.getCurrentWorldTime(), blockEntity.getTimeDisplay() == ETimeDisplay.ETA)).withStyle(ChatFormatting.BOLD) : TextUtils.empty()) + .setText(blockEntity.getXSizeScaled() > 1 && !nextStopAnnounced ? TextUtils.text(ModUtils.formatTime(DragonLib.getCurrentWorldTime(), getDisplaySettings(blockEntity).getTimeDisplay() == ETimeDisplay.ETA)).withStyle(ChatFormatting.BOLD) : TextUtils.empty()) .setPos(blockEntity.getXSizeScaled() * 16 - 3 - timeLabel.getTextWidth() - (this.exitSide != TrainExitSide.UNKNOWN ? 4 : 0), 2.5f) - .setColor((0xFF << 24) | (blockEntity.getColor() & 0x00FFFFFF)) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) ; carriageLabel - .setText(blockEntity.getXSizeScaled() > 1 && !nextStopAnnounced ? TextUtils.text(String.format("%02d", blockEntity.getCarriageData().index() + 1)).withStyle(ChatFormatting.BOLD) : TextUtils.empty()) + .setText(blockEntity.getXSizeScaled() > 1 && !nextStopAnnounced ? TextUtils.text(String.format("%02d", carriageIndex)).withStyle(ChatFormatting.BOLD) : TextUtils.empty()) .setPos(timeLabel.getX() - 4 - carriageLabel.getTextWidth(), 2.5f) - .setColor((0xFF << 24) | (blockEntity.getColor() & 0x00FFFFFF)) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) ; trainLineLabel - .setText(nextStopAnnounced ? ELanguage.translate(keyNextStop, data.getNextStop().get().getName()) : TextUtils.text(data.getTrainData().getName()).withStyle(ChatFormatting.BOLD)) + .setText(nextStopAnnounced ? CustomLanguage.translate(keyNextStop, data.getNextStop().get().getName()) : TextUtils.text((settings.getTrainTextComponents().showTrainName() ? data.getTrainData().getName() + " " : "") + (settings.getTrainTextComponents().showDestination() ? data.getNextStop().get().getDestination() : "")).withStyle(ChatFormatting.BOLD)) .setMaxWidth(blockEntity.getXSizeScaled() * 16 - 6 - (blockEntity.getXSizeScaled() > 1 && !nextStopAnnounced ? timeLabel.getTextWidth() - 4 : 0) - (blockEntity.getXSizeScaled() > 1 && !nextStopAnnounced ? carriageLabel.getTextWidth() - 5 : 0) - (this.exitSide != TrainExitSide.UNKNOWN ? 4 : 0), BoundsHitReaction.SCALE_SCROLL) - .setColor((0xFF << 24) | (blockEntity.getColor() & 0x00FFFFFF)) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) ; speedLabel .setText(ModUtils.calcSpeedString(data.getSpeed(), ModClientConfig.SPEED_UNIT.get()).withStyle(ChatFormatting.BOLD)) .setMaxWidth(blockEntity.getXSizeScaled() * 16 - 6, BoundsHitReaction.CUT_OFF) - .setColor((0xFF << 24) | (blockEntity.getColor() & 0x00FFFFFF)) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) ; dateLabel - .setText(ELanguage.translate(keyDate, blockEntity.getLevel().getDayTime() / Level.TICKS_PER_DAY, ModUtils.formatTime(DragonLib.getCurrentWorldTime(), blockEntity.getTimeDisplay() == ETimeDisplay.ETA))) + .setText(CustomLanguage.translate(keyDate, blockEntity.getLevel().getDayTime() / Level.TICKS_PER_DAY, ModUtils.formatTime(DragonLib.getCurrentWorldTime(), getDisplaySettings(blockEntity).getTimeDisplay() == ETimeDisplay.ETA))) .setMaxWidth(blockEntity.getXSizeScaled() * 16 - 6, BoundsHitReaction.CUT_OFF) - .setColor((0xFF << 24) | (blockEntity.getColor() & 0x00FFFFFF)) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) ; carriageInfoLabel - .setText(TextUtils.text(String.format("%02d", blockEntity.getCarriageData().index() + 1))) + .setText(TextUtils.text(String.format("%02d", carriageIndex))) .setMaxWidth(blockEntity.getXSizeScaled() * 16 - 6, BoundsHitReaction.CUT_OFF) - .setColor((0xFF << 24) | (blockEntity.getColor() & 0x00FFFFFF)) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) ; if (shouldRenderNextConnections() && !nextConnections.getConnections().isEmpty()) { @@ -437,11 +444,11 @@ private void updateContent(AdvancedDisplayBlockEntity blockEntity, TrainDisplayD pageIndicatorLabel .setText(TextUtils.text(generatePageIndexString(page, pages))) .setMaxWidth(blockEntity.getXSizeScaled() * 16 - 6, BoundsHitReaction.CUT_OFF) - .setColor((0xFF << 24) | (blockEntity.getColor() & 0x00FFFFFF)) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) ; nextConnectionsTitleLabel .setMaxWidth(blockEntity.getXSizeScaled() * 16 - 6, BoundsHitReaction.CUT_OFF) - .setColor((0xFF << 24) | (blockEntity.getColor() & 0x00FFFFFF)) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) ; DLUtils.doIfNotNull(nextConnectionsLines, x -> { for (int i = 0; i < MAX_LINES - 1; i++) { @@ -463,23 +470,23 @@ private void updateContent(AdvancedDisplayBlockEntity blockEntity, TrainDisplayD a[LineComponent.PLATFORM.i()] .setText(TextUtils.text(stop.getStationInfo().platform())) .setPos(blockEntity.getXSizeScaled() * 16 - 3 - a[LineComponent.PLATFORM.i()].getTextWidth(), 7.5f + k * 1.7f) - .setColor((0xFF << 24) | (blockEntity.getColor() & 0x00FFFFFF)) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) ; if (a[LineComponent.REAL_TIME.i()] != null) { a[LineComponent.SCHEDULED_TIME.i()] .setPos(3, 7.5f + k * 1.7f) - .setText(TextUtils.text(ModUtils.formatTime(stop.getScheduledDepartureTime(), blockEntity.getTimeDisplay() == ETimeDisplay.ETA))) - .setColor((0xFF << 24) | (blockEntity.getColor() & 0x00FFFFFF)) + .setText(TextUtils.text(ModUtils.formatTime(stop.getScheduledDepartureTime(), getDisplaySettings(blockEntity).getTimeDisplay() == ETimeDisplay.ETA))) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) ; a[LineComponent.REAL_TIME.i()] .setPos(a[LineComponent.SCHEDULED_TIME.i()].getX() + a[LineComponent.SCHEDULED_TIME.i()].getTextWidth() + 1, 7.5f + k * 1.7f) - .setText(TextUtils.text(ModUtils.formatTime(stop.getRealTimeDepartureTime(), blockEntity.getTimeDisplay() == ETimeDisplay.ETA))) + .setText(TextUtils.text(ModUtils.formatTime(stop.getRealTimeDepartureTime(), getDisplaySettings(blockEntity).getTimeDisplay() == ETimeDisplay.ETA))) .setColor(stop.isDepartureDelayed() ? Constants.COLOR_DELAYED : Constants.COLOR_ON_TIME) ; } else { a[LineComponent.SCHEDULED_TIME.i()] .setPos(3, 7.5f + k * 1.7f) - .setText(TextUtils.text(ModUtils.formatTime(stop.getRealTimeDepartureTime(), blockEntity.getTimeDisplay() == ETimeDisplay.ETA))) + .setText(TextUtils.text(ModUtils.formatTime(stop.getRealTimeDepartureTime(), getDisplaySettings(blockEntity).getTimeDisplay() == ETimeDisplay.ETA))) .setColor(stop.isDepartureDelayed() ? Constants.COLOR_DELAYED : Constants.COLOR_ON_TIME) ; } @@ -488,13 +495,13 @@ private void updateContent(AdvancedDisplayBlockEntity blockEntity, TrainDisplayD .setPos(pX, 7.5f + k * 1.7f) .setText(TextUtils.text(stop.getTrainName())) .setMaxWidth(6, BoundsHitReaction.CUT_OFF) - .setColor((0xFF << 24) | (blockEntity.getColor() & 0x00FFFFFF)) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) ; a[LineComponent.DESTINATION.i()] .setPos(pX + 7, 7.5f + k * 1.7f) .setText(TextUtils.text(stop.getDestination())) .setMaxWidth(a[LineComponent.PLATFORM.i()].getX() - 1 - pX - 7, BoundsHitReaction.SCALE_SCROLL) - .setColor((0xFF << 24) | (blockEntity.getColor() & 0x00FFFFFF)) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) ; }); } @@ -510,17 +517,17 @@ private void updateContent(AdvancedDisplayBlockEntity blockEntity, TrainDisplayD TrainStopDisplayData stop = data.getStopsFromCurrentStation().get(k); if (a[LineComponent.REAL_TIME.i()] != null) { a[LineComponent.SCHEDULED_TIME.i()] - .setText(TextUtils.text(ModUtils.formatTime(stop.getScheduledArrivalTime(), blockEntity.getTimeDisplay() == ETimeDisplay.ETA))) - .setColor((0xFF << 24) | (blockEntity.getColor() & 0x00FFFFFF)) + .setText(TextUtils.text(ModUtils.formatTime(stop.getScheduledArrivalTime(), getDisplaySettings(blockEntity).getTimeDisplay() == ETimeDisplay.ETA))) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) ; a[LineComponent.REAL_TIME.i()] .setPos(a[LineComponent.SCHEDULED_TIME.i()].getX() + a[LineComponent.SCHEDULED_TIME.i()].getTextWidth() + 1, 6 + j * 2) - .setText(TextUtils.text(ModUtils.formatTime(stop.getRealTimeArrivalTime(), blockEntity.getTimeDisplay() == ETimeDisplay.ETA))) + .setText(TextUtils.text(ModUtils.formatTime(stop.getRealTimeArrivalTime(), getDisplaySettings(blockEntity).getTimeDisplay() == ETimeDisplay.ETA))) .setColor(stop.isArrivalDelayed() ? Constants.COLOR_DELAYED : Constants.COLOR_ON_TIME) ; } else { a[LineComponent.SCHEDULED_TIME.i()] - .setText(TextUtils.text(ModUtils.formatTime(stop.getRealTimeArrivalTime(), blockEntity.getTimeDisplay() == ETimeDisplay.ETA))) + .setText(TextUtils.text(ModUtils.formatTime(stop.getRealTimeArrivalTime(), getDisplaySettings(blockEntity).getTimeDisplay() == ETimeDisplay.ETA))) .setColor(stop.isArrivalDelayed() ? Constants.COLOR_DELAYED : Constants.COLOR_ON_TIME) ; } @@ -529,7 +536,7 @@ private void updateContent(AdvancedDisplayBlockEntity blockEntity, TrainDisplayD .setPos(pX, 6 + j * 2) .setText(TextUtils.text(stop.getName()).withStyle(j >= linesCount - 1 ? ChatFormatting.BOLD : ChatFormatting.RESET)) .setMaxWidth(blockEntity.getXSizeScaled() * 16 - 3 - pX, BoundsHitReaction.SCALE_SCROLL) - .setColor((0xFF << 24) | (blockEntity.getColor() & 0x00FFFFFF)) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) ; }); } diff --git a/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERPassengerInfoSimple.java b/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERPassengerInfoSimple.java index 41d13542..54816dc0 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERPassengerInfoSimple.java +++ b/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERPassengerInfoSimple.java @@ -2,11 +2,10 @@ import de.mrjulsen.crn.block.blockentity.AdvancedDisplayBlockEntity; import de.mrjulsen.crn.block.blockentity.AdvancedDisplayBlockEntity.EUpdateReason; -import de.mrjulsen.crn.block.display.AdvancedDisplaySource.ETimeDisplay; +import de.mrjulsen.crn.block.display.properties.PassengerInformationScrollingTextSettings; import de.mrjulsen.crn.client.ber.AdvancedDisplayRenderInstance; -import de.mrjulsen.crn.client.ber.IBERRenderSubtype; import de.mrjulsen.crn.client.gui.ModGuiIcons; -import de.mrjulsen.crn.client.lang.ELanguage; +import de.mrjulsen.crn.client.lang.CustomLanguage; import de.mrjulsen.crn.config.ModClientConfig; import de.mrjulsen.crn.data.TrainExitSide; import de.mrjulsen.crn.util.ModUtils; @@ -21,7 +20,9 @@ import net.minecraft.world.level.block.HorizontalDirectionalBlock; import net.minecraft.world.level.block.state.BlockState; -public class BERPassengerInfoSimple implements IBERRenderSubtype { +public class BERPassengerInfoSimple implements AbstractAdvancedDisplayRenderer { + + public BERPassengerInfoSimple() {} private static final String keyNextStop = "gui.createrailwaysnavigator.route_overview.next_stop"; private static final String keyDate = "gui.createrailwaysnavigator.route_overview.date"; @@ -70,7 +71,7 @@ public void render(BERGraphics graphics, float parti uv * (ModGuiIcons.ARROW_RIGHT.getU() + ModGuiIcons.ICON_SIZE), uv * (ModGuiIcons.ARROW_RIGHT.getV() + ModGuiIcons.ICON_SIZE), graphics.blockEntity().getBlockState().getValue(HorizontalDirectionalBlock.FACING), - (0xFF << 24) | (graphics.blockEntity().getColor()), + (0xFF << 24) | (getDisplaySettings(graphics.blockEntity()).getFontColor()), light ); break; @@ -89,7 +90,7 @@ public void render(BERGraphics graphics, float parti uv * (ModGuiIcons.ARROW_LEFT.getU() + ModGuiIcons.ICON_SIZE), uv * (ModGuiIcons.ARROW_LEFT.getV() + ModGuiIcons.ICON_SIZE), graphics.blockEntity().getBlockState().getValue(HorizontalDirectionalBlock.FACING), - (0xFF << 24) | (graphics.blockEntity().getColor()), + (0xFF << 24) | (getDisplaySettings(graphics.blockEntity()).getFontColor()), light ); break; @@ -115,27 +116,43 @@ public void update(Level level, BlockPos pos, BlockState state, AdvancedDisplayB return; } - this.exitSide = blockEntity.getTrainData().isWaitingAtStation() ? exitSide : blockEntity.relativeExitDirection.get(); + PassengerInformationScrollingTextSettings settings = getDisplaySettings(blockEntity); + + this.exitSide = settings.showExit() ? (blockEntity.getTrainData().isWaitingAtStation() ? exitSide : blockEntity.relativeExitDirection.get()) : TrainExitSide.UNKNOWN; if (!blockEntity.getTrainData().getNextStop().isPresent()) { - label.setText(TextUtils.text(blockEntity.getTrainData().getTrainData().getName())); + label.setText(settings.getTrainTextComponents().showTrainName() ? TextUtils.text(blockEntity.getTrainData().getTrainData().getName()) : TextUtils.empty()); } else if (blockEntity.getTrainData().isWaitingAtStation()) { label.setText(TextUtils.text(blockEntity.getTrainData().getNextStop().get().getName())); } else if (blockEntity.getTrainData().getNextStop().get().getRealTimeArrivalTime() - DragonLib.getCurrentWorldTime() < ModClientConfig.NEXT_STOP_ANNOUNCEMENT.get()) { - label.setText(ELanguage.translate(keyNextStop, blockEntity.getTrainData().getNextStop().get().getName())); + label.setText(CustomLanguage.translate(keyNextStop, blockEntity.getTrainData().getNextStop().get().getName())); } else { final int slides = 3; int slide = (int)(DragonLib.getCurrentWorldTime() % (TICKS_PER_SLIDE * slides)) / TICKS_PER_SLIDE; - switch (slide) { - case 0 -> label.setText(TextUtils.text(blockEntity.getTrainData().getTrainData().getName() + " " + blockEntity.getTrainData().getNextStop().get().getDestination())); - case 1 -> label.setText(ELanguage.translate(keyDate, blockEntity.getLevel().getDayTime() / Level.TICKS_PER_DAY, ModUtils.formatTime(DragonLib.getCurrentWorldTime(), blockEntity.getTimeDisplay() == ETimeDisplay.ETA))); - case 2 -> label.setText(ModUtils.calcSpeedString(blockEntity.getTrainData().getSpeed(), ModClientConfig.SPEED_UNIT.get())); + if ((slide == 1 && !settings.showTimeAndDate()) || + (slide == 2 && !settings.showStats()) + ) { + slide++; + } + slide %= slides; + switch (slide) { + case 0 -> label.setText(TextUtils.text((settings.getTrainTextComponents().showTrainName() + ? blockEntity.getTrainData().getTrainData().getName() + " " + : "") + + (settings.getTrainTextComponents().showDestination() + ? blockEntity.getTrainData().getNextStop().get().getDestination() + : ""))); + case 1 -> label + .setText(CustomLanguage.translate(keyDate, blockEntity.getLevel().getDayTime() / Level.TICKS_PER_DAY, + ModUtils.formatTime(DragonLib.getCurrentWorldTime(), false))); + case 2 -> label.setText(ModUtils.calcSpeedString(blockEntity.getTrainData().getSpeed(), + ModClientConfig.SPEED_UNIT.get())); } this.exitSide = TrainExitSide.UNKNOWN; } label .setMaxWidth(blockEntity.getXSizeScaled() * 16 - 6 - (exitSide == TrainExitSide.UNKNOWN ? 0 : 10), BoundsHitReaction.SCROLL) - .setColor((0xFF << 24) | (blockEntity.getColor() & 0x00FFFFFF)) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) ; } } diff --git a/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERPlatformDetailed.java b/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERPlatformDetailed.java index 3d560f3b..61b3d84f 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERPlatformDetailed.java +++ b/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERPlatformDetailed.java @@ -7,10 +7,10 @@ import de.mrjulsen.crn.CreateRailwaysNavigator; import de.mrjulsen.crn.block.blockentity.AdvancedDisplayBlockEntity; import de.mrjulsen.crn.block.blockentity.AdvancedDisplayBlockEntity.EUpdateReason; -import de.mrjulsen.crn.block.display.AdvancedDisplaySource.ETimeDisplay; +import de.mrjulsen.crn.block.properties.ETimeDisplay; +import de.mrjulsen.crn.block.display.properties.PlatformDisplayTableSettings; import de.mrjulsen.crn.client.ber.AdvancedDisplayRenderInstance; -import de.mrjulsen.crn.client.ber.IBERRenderSubtype; -import de.mrjulsen.crn.client.lang.ELanguage; +import de.mrjulsen.crn.client.lang.CustomLanguage; import de.mrjulsen.crn.config.ModClientConfig; import de.mrjulsen.crn.data.train.TrainStatus.CompiledTrainStatus; import de.mrjulsen.crn.data.train.portable.StationDisplayData; @@ -19,6 +19,7 @@ import de.mrjulsen.mcdragonlib.client.ber.BERGraphics; import de.mrjulsen.mcdragonlib.client.ber.BERLabel; import de.mrjulsen.mcdragonlib.client.ber.BERLabel.BoundsHitReaction; +import de.mrjulsen.mcdragonlib.util.ColorUtils; import de.mrjulsen.mcdragonlib.util.DLUtils; import de.mrjulsen.mcdragonlib.util.TextUtils; import de.mrjulsen.mcdragonlib.util.TimeUtils; @@ -28,7 +29,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; -public class BERPlatformDetailed implements IBERRenderSubtype { +public class BERPlatformDetailed implements AbstractAdvancedDisplayRenderer { private static final String keyTime = "gui.createrailwaysnavigator.time"; @@ -70,7 +71,7 @@ public void renderTick(float deltaTime) { @Override public void tick(Level level, BlockPos pos, BlockState state, AdvancedDisplayBlockEntity blockEntity, AdvancedDisplayRenderInstance parent) { timeLabel - .setText(ELanguage.translate(keyTime, ModUtils.formatTime(DragonLib.getCurrentWorldTime(), blockEntity.getTimeDisplay() == ETimeDisplay.ETA))) + .setText(CustomLanguage.translate(keyTime, ModUtils.formatTime(DragonLib.getCurrentWorldTime(), false))) ; } @@ -105,10 +106,17 @@ public void update(Level level, BlockPos pos, BlockState state, AdvancedDisplayB this.infoLineText = TextUtils.concat(TextUtils.text(" +++ "), preds.stream().limit(maxLines).filter(x -> x.getTrainData().hasStatusInfo() && x.getStationData().isDepartureDelayed()).flatMap(x -> { Collection content = new ArrayList<>(); if (x.getTrainData().isCancelled()) { - content.add(ELanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.information_about_cancelled", x.getTrainData().getName())); + content.add(CustomLanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.information_about_cancelled", x.getTrainData().getName())); return content.stream(); } - content.add(ELanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.information_about_delayed", x.getTrainData().getName(), TimeUtils.formatToMinutes(x.getStationData().getDepartureTimeDeviation()))); + String delay = getDisplaySettings(blockEntity).getTimeDisplay() == ETimeDisplay.ETA ? ModUtils.timeRemainingString(x.getStationData().getDepartureTimeDeviation()) : String.valueOf(TimeUtils.formatToMinutes(x.getStationData().getDepartureTimeDeviation())); + + MutableComponent delayComponent = CustomLanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.information_about_delayed", x.getTrainData().getName(), delay); + if (getDisplaySettings(blockEntity).getTimeDisplay() == ETimeDisplay.ABS) { + delayComponent.append(" ").append(CustomLanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.delay_abs_suffix")); + } + content.add(delayComponent); + for (CompiledTrainStatus status : x.getTrainData().getStatus()) { content.add(status.text()); } @@ -145,39 +153,52 @@ private void updateLayout(AdvancedDisplayBlockEntity blockEntity, List { +public class BERPlatformInformative implements AbstractAdvancedDisplayRenderer { //TODO PlatformWidth verwenden private static final String keyFollowingTrains = "gui.createrailwaysnavigator.following_trains"; @@ -40,14 +43,16 @@ public class BERPlatformInformative implements IBERRenderSubtype x.renderTick()); + DLUtils.doIfNotNull(platformLabel, x -> x.renderTick()); DLUtils.doIfNotNull(focusArea, x -> { for (int i = 0; i < x.length; i++) { DLUtils.doIfNotNull(x[i], y -> y.renderTick()); @@ -71,9 +76,9 @@ private boolean isExtendedDisplay(AdvancedDisplayBlockEntity blockEntity) { @Override public void render(BERGraphics graphics, float pPartialTicks, AdvancedDisplayRenderInstance parent, int light, boolean backSide) { if (isExtendedDisplay(graphics.blockEntity())) { - BERUtils.fillColor(graphics, 2.5f, 15.5f, 0.0f, graphics.blockEntity().getXSizeScaled() * 16 - 5, 0.25f, (0xFF << 24) | (graphics.blockEntity().getColor() & 0x00FFFFFF), graphics.blockEntity().getBlockState().getValue(HorizontalDirectionalBlock.FACING), light); + BERUtils.fillColor(graphics, 2.5f, 15.5f, 0.0f, graphics.blockEntity().getXSizeScaled() * 16 - 5, 0.25f, (0xFF << 24) | (getDisplaySettings(graphics.blockEntity()).getFontColor() & 0x00FFFFFF), graphics.blockEntity().getBlockState().getValue(HorizontalDirectionalBlock.FACING), light); followingTrainsLabel - .setColor((0xFF << 24) | (graphics.blockEntity().getColor() & 0x00FFFFFF)) + .setColor((0xFF << 24) | (getDisplaySettings(graphics.blockEntity()).getFontColor() & 0x00FFFFFF)) ; followingTrainsLabel.render(graphics, light); } @@ -93,9 +98,9 @@ public void render(BERGraphics graphics, float pPart } else if (i == LineComponent.TRAIN_NAME.i()) { graphics.poseStack().translate(-label.getX() + maxWidth - 3 - label.getTextWidth(), 0, 0); } else if (i == LineComponent.DESTINATION.i()) { - graphics.poseStack().translate(-label.getX() + 5 + a[LineComponent.PLATFORM.i()].getTextWidth(), 0, 0); + graphics.poseStack().translate(-label.getX() + 5 + platformLabel.getMaxWidth(), 0, 0); } else if (i == LineComponent.STOPOVERS.i()) { - graphics.poseStack().translate(-label.getX() + 5 + a[LineComponent.PLATFORM.i()].getTextWidth(), 0, 0); + graphics.poseStack().translate(-label.getX() + 5 + platformLabel.getMaxWidth(), 0, 0); } else if (i == LineComponent.PLATFORM.i()) { graphics.poseStack().translate(-label.getX() + 3, 0, 0); } @@ -115,14 +120,21 @@ public void render(BERGraphics graphics, float pPart } }); + graphics.poseStack().pushPose(); + if (statusLabel != null && !statusLabel.getText().getString().isBlank()) { graphics.poseStack().pushPose(); - if (backSide && focusArea != null && focusArea[LineComponent.PLATFORM.i()] != null) { - graphics.poseStack().translate(-statusLabel.getX() + 5 + focusArea[LineComponent.PLATFORM.i()].getTextWidth(), 0, 0); + if (backSide) { + graphics.poseStack().translate(-statusLabel.getX() + 5 + platformLabel.getMaxWidth(), 0, 0); } DLUtils.doIfNotNull(statusLabel, x -> x.render(graphics, light)); graphics.poseStack().popPose(); } + if (backSide && platformLabel != null) { + graphics.poseStack().translate(-graphics.blockEntity().getXSizeScaled() * 16 + 6 + platformLabel.getTextWidth(), 0, 0); + } + platformLabel.render(graphics, light); + graphics.poseStack().popPose(); } @Override @@ -133,6 +145,15 @@ public void update(Level level, BlockPos pos, BlockState state, AdvancedDisplayB lines = null; focusArea = null; statusLabel = null; + + if (blockEntity.isPlatformFixed() && blockEntity.getStationInfo() != null) { + this.platformLabel + .setText(TextUtils.text(blockEntity.getStationInfo().platform()).withStyle(ChatFormatting.BOLD)) + .setPos(blockEntity.getXSizeScaled() * 16 - 3 - platformLabel.getTextWidth(), 3); + ; + } else { + this.platformLabel.setText(TextUtils.empty()); + } return; } @@ -145,9 +166,15 @@ public void update(Level level, BlockPos pos, BlockState state, AdvancedDisplayB // Update status label Collection content = new ArrayList<>(); if (preds.get(0).getTrainData().isCancelled()) { - content.add(ELanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.cancelled")); - } else { - content.add(ELanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.delayed", TimeUtils.formatToMinutes(preds.get(0).getStationData().getDepartureTimeDeviation()))); + content.add(CustomLanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.cancelled")); + } else { + TrainStopDisplayData displayData = preds.get(0).getStationData(); + String delay = getDisplaySettings(blockEntity).getTimeDisplay() == ETimeDisplay.ETA ? ModUtils.timeRemainingString(displayData.getDepartureTimeDeviation()) : String.valueOf(TimeUtils.formatToMinutes(displayData.getDepartureTimeDeviation())); + MutableComponent delayComponent = CustomLanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.delayed", delay); + if (getDisplaySettings(blockEntity).getTimeDisplay() == ETimeDisplay.ABS) { + delayComponent.append(" ").append(CustomLanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.delay_abs_suffix")); + } + content.add(delayComponent); for (CompiledTrainStatus status : preds.get(0).getTrainData().getStatus()) { content.add(status.text()); } @@ -169,14 +196,14 @@ private void updateLayout(AdvancedDisplayBlockEntity blockEntity, List (Component)TextUtils.text(a)).toList())) .setPos(x, 6) .setMaxWidth(w, BoundsHitReaction.SCALE_SCROLL) @@ -330,25 +378,41 @@ private void updateFocusContent(AdvancedDisplayBlockEntity blockEntity, StationD .setText(infoLineText) .setPos(x, 2.5f) .setMaxWidth(w, BoundsHitReaction.SCALE_SCROLL) + .setColor(ColorUtils.brightnessDependingFontColor(getDisplaySettings(blockEntity).getFontColor(), LIGHT_FONT_COLOR, DARK_FONT_COLOR)) ; } private void updateTableContent(AdvancedDisplayBlockEntity blockEntity, StationDisplayData stop, int index) { - boolean isLast = stop.isLastStop(); + PlatformDisplayFocusSettings settings = getDisplaySettings(blockEntity); + boolean isLast = (settings.showArrival() && stop.isLastStop()) || stop.isNextSectionExcluded(); + BERLabel[] components = lines[index]; components[LineComponent.TIME.i()] - .setText(TextUtils.text(ModUtils.formatTime(stop.getScheduledTime(), blockEntity.getTimeDisplay() == ETimeDisplay.ETA))) + .setText(TextUtils.text(ModUtils.formatTime(stop.getScheduledTime(), getDisplaySettings(blockEntity).getTimeDisplay() == ETimeDisplay.ETA))) ; components[LineComponent.REAL_TIME.i()] .setText(TextUtils.text(stop.getTrainData().isCancelled() ? " \u274C " : // X (stop.getStationData().isDepartureDelayed() ? - (ModUtils.formatTime(isLast ? stop.getStationData().getRealTimeArrivalTime() : stop.getStationData().getRealTimeDepartureTime(), blockEntity.getTimeDisplay() == ETimeDisplay.ETA)) : + (ModUtils.formatTime(isLast ? stop.getStationData().getRealTimeArrivalTime() : stop.getStationData().getRealTimeDepartureTime(), getDisplaySettings(blockEntity).getTimeDisplay() == ETimeDisplay.ETA)) : ""))) // Nothing (not delayed) + .setColor(ColorUtils.brightnessDependingFontColor(getDisplaySettings(blockEntity).getFontColor(), LIGHT_FONT_COLOR, DARK_FONT_COLOR)) ; - components[LineComponent.TRAIN_NAME.i()] + BERLabel trainNameLabel = components[LineComponent.TRAIN_NAME.i()] .setText(TextUtils.text(stop.getTrainData().getName())) + .setBackground(settings.showLineColor() && stop.getTrainData().hasColor() ? (0xFF << 24) | (stop.getTrainData().getColor() & 0x00FFFFFF) : 0, false) ; + if (settings.showLineColor() && stop.getTrainData().hasColor()) { + trainNameLabel + .setBackground((0xFF << 24) | (stop.getTrainData().getColor() & 0x00FFFFFF), false) + .setColor(ColorUtils.brightnessDependingFontColor(stop.getTrainData().getColor(), LIGHT_FONT_COLOR, DARK_FONT_COLOR)) + ; + } else { + trainNameLabel + .setBackground(0, false) + .setColor((0xFF << 24) | (settings.getFontColor() & 0x00FFFFFF)) + ; + } components[LineComponent.PLATFORM.i()] .setText(blockEntity.isPlatformFixed() ? TextUtils.empty() : @@ -356,7 +420,7 @@ private void updateTableContent(AdvancedDisplayBlockEntity blockEntity, StationD ; components[LineComponent.DESTINATION.i()] .setText(isLast ? - ELanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".schedule_board.train_from", stop.getFirstStopName()) : + CustomLanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".schedule_board.train_from", stop.getFirstStopName()) : TextUtils.text(stop.getStationData().getDestination())) ; @@ -365,18 +429,25 @@ private void updateTableContent(AdvancedDisplayBlockEntity blockEntity, StationD x += components[LineComponent.TIME.i()].getTextWidth() + 2; components[LineComponent.REAL_TIME.i()].setPos(x, 11 + 3 + index * LINE_HEIGHT); x += components[LineComponent.REAL_TIME.i()].getTextWidth() + 2 + (!components[LineComponent.REAL_TIME.i()].getText().getString().isEmpty() ? 2 : 0); - - BERLabel trainNameLabel = components[LineComponent.TRAIN_NAME.i()] + + float trainNameWidth = settings.isAutoTrainNameWidth() ? trainNameLabel.getTextWidth() : settings.getTrainNameWidth(); + trainNameLabel .setPos(x, 11 + 3 + index * LINE_HEIGHT) - .setMaxWidth(blockEntity.getTrainNameWidth(), BoundsHitReaction.SCALE_SCROLL) + .setMaxWidth(trainNameWidth, BoundsHitReaction.SCALE_SCROLL) ; - x += trainNameLabel.getMaxWidth() + 2; + x += trainNameLabel.getMaxWidth() + 2; + BERLabel platformLabel = components[LineComponent.PLATFORM.i()]; - float platformWidth = platformLabel.getTextWidth(); - platformLabel.setPos(blockEntity.getXSizeScaled() * 16 - 3 - platformWidth, 11 + 3 + index * LINE_HEIGHT); - components[LineComponent.DESTINATION.i()].setPos(x, 11 + 3 + index * LINE_HEIGHT); - components[LineComponent.DESTINATION.i()].setMaxWidth(blockEntity.getXSizeScaled() * 16 - 3 - x - platformWidth - 3, BoundsHitReaction.SCALE_SCROLL); + float platformWidth = settings.isAutoPlatformWidth() ? platformLabel.getTextWidth() : settings.getPlatformWidth(); + platformLabel + .setPos(blockEntity.getXSizeScaled() * 16 - 3 - platformLabel.getTextWidth(), 11 + 3 + index * LINE_HEIGHT) + .setMaxWidth(platformWidth, BoundsHitReaction.SCALE_SCROLL) + ; + components[LineComponent.DESTINATION.i()] + .setPos(x, 11 + 3 + index * LINE_HEIGHT) + .setMaxWidth(blockEntity.getXSizeScaled() * 16 - 3 - x - platformWidth - 3, BoundsHitReaction.SCALE_SCROLL) + ; } private static enum LineComponent { diff --git a/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERPlatformSimple.java b/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERPlatformSimple.java index 9c12a23e..c607cbeb 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERPlatformSimple.java +++ b/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERPlatformSimple.java @@ -6,10 +6,10 @@ import de.mrjulsen.crn.CreateRailwaysNavigator; import de.mrjulsen.crn.block.blockentity.AdvancedDisplayBlockEntity; import de.mrjulsen.crn.block.blockentity.AdvancedDisplayBlockEntity.EUpdateReason; -import de.mrjulsen.crn.block.display.AdvancedDisplaySource.ETimeDisplay; +import de.mrjulsen.crn.block.properties.ETimeDisplay; +import de.mrjulsen.crn.block.display.properties.PlatformDisplayScrollingTextSettings; import de.mrjulsen.crn.client.ber.AdvancedDisplayRenderInstance; -import de.mrjulsen.crn.client.ber.IBERRenderSubtype; -import de.mrjulsen.crn.client.lang.ELanguage; +import de.mrjulsen.crn.client.lang.CustomLanguage; import de.mrjulsen.crn.config.ModClientConfig; import de.mrjulsen.crn.data.train.portable.StationDisplayData; import de.mrjulsen.crn.util.ModUtils; @@ -25,7 +25,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; -public class BERPlatformSimple implements IBERRenderSubtype { +public class BERPlatformSimple implements AbstractAdvancedDisplayRenderer { private static final String keyTrainDeparture = "gui.createrailwaysnavigator.route_overview.notification.journey_begins"; private static final String keyTrainDepartureWithPlatform = "gui.createrailwaysnavigator.route_overview.notification.journey_begins_with_platform"; @@ -51,7 +51,7 @@ public void renderTick(float deltaTime) { @Override public void tick(Level level, BlockPos pos, BlockState state, AdvancedDisplayBlockEntity blockEntity, AdvancedDisplayRenderInstance parent) { List textContent = new ArrayList<>(texts); - textContent.add(0, ELanguage.translate(keyTime, TimeUtils.parseTime((int)(blockEntity.getLevel().getDayTime() % DragonLib.TICKS_PER_DAY + DragonLib.DAYTIME_SHIFT), ModClientConfig.TIME_FORMAT.get()))); + textContent.add(0, CustomLanguage.translate(keyTime, TimeUtils.parseTime((int)(blockEntity.getLevel().getDayTime() % DragonLib.ticksPerDay() + DragonLib.daytimeShift()), ModClientConfig.TIME_FORMAT.get()))); MutableComponent txt = TextUtils.concat(textContent); label .setText(txt) @@ -68,35 +68,32 @@ public void update(Level level, BlockPos pos, BlockState state, AdvancedDisplayB List preds = blockEntity.getStops().stream().filter(x -> x.getStationData().getScheduledArrivalTime() < DragonLib.getCurrentWorldTime() + ModClientConfig.DISPLAY_LEAD_TIME.get() && (!x.getTrainData().isCancelled() || DragonLib.getCurrentWorldTime() < x.getStationData().getScheduledDepartureTime() + ModClientConfig.DISPLAY_LEAD_TIME.get())).toList(); label - .setColor((0xFF << 24) | (blockEntity.getColor() & 0x00FFFFFF)) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) .setMaxWidth(blockEntity.getXSizeScaled() * 16 - 6, BoundsHitReaction.SCALE_SCROLL) ; texts = new ArrayList<>(); - texts.addAll(preds.stream().map(x -> { - String timeString; - switch (blockEntity.getTimeDisplay()) { - case ETA: - timeString = ModUtils.timeRemainingString(x.getStationData().getScheduledDepartureTime()); - break; - default: - timeString = ModUtils.formatTime(x.getStationData().getScheduledDepartureTime(), blockEntity.getTimeDisplay() == ETimeDisplay.ETA); - break; - } - + texts.addAll(preds.stream().filter(x -> { + return !x.isNextSectionExcluded(); + }).map(x -> { + String timeString = ModUtils.formatTime(x.getStationData().getScheduledDepartureTime(), getDisplaySettings(blockEntity).getTimeDisplay() == ETimeDisplay.ETA); MutableComponent text = TextUtils.empty(); if (x.getStationData().getStationInfo().platform() == null || x.getStationData().getStationInfo().platform().isBlank()) { - text.append(ELanguage.translate(keyTrainDeparture, x.getTrainData().getName(), x.getStationData().getDestination(), timeString)); + text.append(CustomLanguage.translate(keyTrainDeparture, x.getTrainData().getName(), x.getStationData().getDestination(), timeString)); } else { - text.append(ELanguage.translate(keyTrainDepartureWithPlatform, x.getTrainData().getName(), x.getStationData().getDestination(), timeString, x.getStationData().getStationInfo().platform())); + text.append(CustomLanguage.translate(keyTrainDepartureWithPlatform, x.getTrainData().getName(), x.getStationData().getDestination(), timeString, x.getStationData().getStationInfo().platform())); } if (x.getTrainData().isCancelled()) { - text.append(ELanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.cancelled2").getString()); + text.append(", ").append(CustomLanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.cancelled2").getString()); } else if (x.getStationData().isDepartureDelayed()) { - text.append(ELanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.delayed2", TimeUtils.formatToMinutes(x.getStationData().getDepartureTimeDeviation())).getString()); + String delay = getDisplaySettings(blockEntity).getTimeDisplay() == ETimeDisplay.ETA ? ModUtils.timeRemainingString(x.getStationData().getDepartureTimeDeviation()) : String.valueOf(TimeUtils.formatToMinutes(x.getStationData().getDepartureTimeDeviation())); + text.append(", ").append(CustomLanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.delayed2", delay).getString()); + if (getDisplaySettings(blockEntity).getTimeDisplay() == ETimeDisplay.ABS) { + text.append(" ").append(CustomLanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.delay_abs_suffix")); + } if (x.getTrainData().hasStatusInfo()) { - text.append(" ").append(ELanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.reason").getString()).append(x.getTrainData().getStatus().get(0).text()); + text.append(" ").append(CustomLanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.reason").getString()).append(x.getTrainData().getStatus().get(0).text()); } } return text; diff --git a/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERTrainDestinationDetailed.java b/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERTrainDestinationDetailed.java index 7505ad10..e49c8c44 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERTrainDestinationDetailed.java +++ b/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERTrainDestinationDetailed.java @@ -3,9 +3,9 @@ import de.mrjulsen.crn.CreateRailwaysNavigator; import de.mrjulsen.crn.block.blockentity.AdvancedDisplayBlockEntity; import de.mrjulsen.crn.block.blockentity.AdvancedDisplayBlockEntity.EUpdateReason; +import de.mrjulsen.crn.block.display.properties.TrainDestinationExtendedSettings; import de.mrjulsen.crn.client.ber.AdvancedDisplayRenderInstance; -import de.mrjulsen.crn.client.ber.IBERRenderSubtype; -import de.mrjulsen.crn.client.lang.ELanguage; +import de.mrjulsen.crn.client.lang.CustomLanguage; import de.mrjulsen.mcdragonlib.client.ber.BERGraphics; import de.mrjulsen.mcdragonlib.client.ber.BERLabel; import de.mrjulsen.mcdragonlib.client.ber.BERLabel.BoundsHitReaction; @@ -16,9 +16,9 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; -public class BERTrainDestinationDetailed implements IBERRenderSubtype { +public class BERTrainDestinationDetailed implements AbstractAdvancedDisplayRenderer { - private final BERLabel outOfServiceLabel = new BERLabel(ELanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.not_in_service")) + private final BERLabel outOfServiceLabel = new BERLabel(CustomLanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.not_in_service")) .setPos(3, 6) .setScale(0.5f, 0.25f) .setYScale(0.5f) @@ -37,7 +37,7 @@ public class BERTrainDestinationDetailed implements IBERRenderSubtype (Component)TextUtils.text(x.getName())).toList())) - .setColor((0xFF << 24) | (blockEntity.getColor() & 0x00FFFFFF)) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) ; } } diff --git a/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERTrainDestinationInformative.java b/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERTrainDestinationInformative.java index dd67781d..58e4dab6 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERTrainDestinationInformative.java +++ b/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERTrainDestinationInformative.java @@ -3,8 +3,8 @@ import de.mrjulsen.crn.CreateRailwaysNavigator; import de.mrjulsen.crn.block.blockentity.AdvancedDisplayBlockEntity; import de.mrjulsen.crn.block.blockentity.AdvancedDisplayBlockEntity.EUpdateReason; +import de.mrjulsen.crn.block.display.properties.TrainDestinationDetailedSettings; import de.mrjulsen.crn.client.ber.AdvancedDisplayRenderInstance; -import de.mrjulsen.crn.client.ber.IBERRenderSubtype; import de.mrjulsen.mcdragonlib.client.ber.BERGraphics; import de.mrjulsen.mcdragonlib.client.ber.BERLabel; import de.mrjulsen.mcdragonlib.client.ber.BERLabel.BoundsHitReaction; @@ -18,7 +18,7 @@ import net.minecraft.world.level.block.HorizontalDirectionalBlock; import net.minecraft.world.level.block.state.BlockState; -public class BERTrainDestinationInformative implements IBERRenderSubtype { +public class BERTrainDestinationInformative implements AbstractAdvancedDisplayRenderer { private static final ResourceLocation CARRIAGE_ICON = new ResourceLocation("create:textures/gui/assemble.png"); private static final ResourceLocation ICONS = new ResourceLocation(CreateRailwaysNavigator.MOD_ID, "textures/gui/icons.png"); @@ -61,8 +61,8 @@ public void renderTick(float deltaTime) { @Override public void render(BERGraphics graphics, float partialTick, AdvancedDisplayRenderInstance parent, int light, boolean backSide) { float uv = 1.0f / 256.0f; - BERUtils.fillColor(graphics, 2.5f, 5.0f, 0.0f, graphics.blockEntity().getXSizeScaled() * 16 - 5, 0.25f, (0xFF << 24) | (graphics.blockEntity().getColor() & 0x00FFFFFF), graphics.blockEntity().getBlockState().getValue(HorizontalDirectionalBlock.FACING), light); - BERUtils.renderTexture(CARRIAGE_ICON, graphics, false, graphics.blockEntity().getXSizeScaled() * 16 - 7 - carriageIndexLabel.getTextWidth(), 2.5f, 0, 3, 2, uv * 22, uv * 231, uv * 22 + uv * 13, uv * 231 + uv * 5, graphics.blockEntity().getBlockState().getValue(HorizontalDirectionalBlock.FACING).getOpposite(), (0xFF << 24) | (graphics.blockEntity().getColor() & 0x00FFFFFF), light); + BERUtils.fillColor(graphics, 2.5f, 5.0f, 0.0f, graphics.blockEntity().getXSizeScaled() * 16 - 5, 0.25f, (0xFF << 24) | (getDisplaySettings(graphics.blockEntity()).getFontColor() & 0x00FFFFFF), graphics.blockEntity().getBlockState().getValue(HorizontalDirectionalBlock.FACING), light); + BERUtils.renderTexture(CARRIAGE_ICON, graphics, false, graphics.blockEntity().getXSizeScaled() * 16 - 7 - carriageIndexLabel.getTextWidth(), 2.5f, 0, 3, 2, uv * 22, uv * 231, uv * 22 + uv * 13, uv * 231 + uv * 5, graphics.blockEntity().getBlockState().getValue(HorizontalDirectionalBlock.FACING).getOpposite(), (0xFF << 24) | (getDisplaySettings(graphics.blockEntity()).getFontColor() & 0x00FFFFFF), light); carriageIndexLabel.render(graphics, light); if (graphics.blockEntity().getTrainData() == null || graphics.blockEntity().getTrainData().isEmpty()) { @@ -88,7 +88,7 @@ public void render(BERGraphics graphics, float parti uv * (195 + 10), uv * (19 + 10), graphics.blockEntity().getBlockState().getValue(HorizontalDirectionalBlock.FACING), - (0xFF << 24) | (graphics.blockEntity().getColor() & 0x00FFFFFF), + (0xFF << 24) | (getDisplaySettings(graphics.blockEntity()).getFontColor() & 0x00FFFFFF), light ); @@ -106,7 +106,7 @@ public void render(BERGraphics graphics, float parti uv * (211 + 10), uv * (19 + 10), graphics.blockEntity().getBlockState().getValue(HorizontalDirectionalBlock.FACING), - (0xFF << 24) | (graphics.blockEntity().getColor() & 0x00FFFFFF), + (0xFF << 24) | (getDisplaySettings(graphics.blockEntity()).getFontColor() & 0x00FFFFFF), light ); } @@ -120,34 +120,36 @@ public void update(Level level, BlockPos pos, BlockState state, AdvancedDisplayB } private void updateContent(AdvancedDisplayBlockEntity blockEntity) { + TrainDestinationDetailedSettings settings = getDisplaySettings(blockEntity); + int index = (settings.shouldOverwriteCarriageIndex() ? 0 : blockEntity.getCarriageData().index() + 1) + settings.getCarriageIndex(); carriageIndexLabel - .setText(TextUtils.text(String.format("%02d", blockEntity.getCarriageData().index() + 1)).withStyle(ChatFormatting.BOLD)) + .setText(TextUtils.text(String.format("%02d", index)).withStyle(ChatFormatting.BOLD)) .setPos(blockEntity.getXSizeScaled() * 16 - 3 - carriageIndexLabel.getTextWidth(), 2.5f) - .setColor((0xFF << 24) | (blockEntity.getColor() & 0x00FFFFFF)) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) ; trainLineLabel .setPos(3, 2.5f) .setMaxWidth(blockEntity.getXSizeScaled() * 16 - 6 - carriageIndexLabel.getTextWidth() - 5, BoundsHitReaction.SCALE_SCROLL) .setText(TextUtils.text(blockEntity.getTrainData().getTrainData().getName()).withStyle(ChatFormatting.BOLD)) - .setColor((0xFF << 24) | (blockEntity.getColor() & 0x00FFFFFF)) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) ; fromLabel .setPos(6, 6) .setMaxWidth(blockEntity.getXSizeScaled() * 16 - 9, BoundsHitReaction.SCALE_SCROLL) .setText(TextUtils.text(!blockEntity.getTrainData().getAllStops().isEmpty() ? blockEntity.getTrainData().getAllStops().get(0).getName() : "")) - .setColor((0xFF << 24) | (blockEntity.getColor() & 0x00FFFFFF)) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) ; stopoversLabel .setPos(6, 8.75f) .setMaxWidth(blockEntity.getXSizeScaled() * 16 - 9, BoundsHitReaction.SCALE_SCROLL) .setText(TextUtils.concat(TextUtils.text(" \u25CF "), blockEntity.getTrainData().getStopovers().stream().map(x -> (Component)TextUtils.text(x.getName())).toList())) - .setColor((0xFF << 24) | (blockEntity.getColor() & 0x00FFFFFF)) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) ; destinationLabel .setPos(6, 11) .setMaxWidth(blockEntity.getXSizeScaled() * 16 - 9, BoundsHitReaction.SCALE_SCROLL) .setText(TextUtils.text(blockEntity.getTrainData().getNextStop().isPresent() ? blockEntity.getTrainData().getNextStop().get().getDestination() : "").withStyle(ChatFormatting.BOLD)) - .setColor((0xFF << 24) | (blockEntity.getColor() & 0x00FFFFFF)) + .setColor((0xFF << 24) | (getDisplaySettings(blockEntity).getFontColor() & 0x00FFFFFF)) ; } } diff --git a/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERTrainDestinationSimple.java b/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERTrainDestinationSimple.java index 23881277..0083401e 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERTrainDestinationSimple.java +++ b/common/src/main/java/de/mrjulsen/crn/client/ber/variants/BERTrainDestinationSimple.java @@ -3,9 +3,9 @@ import de.mrjulsen.crn.CreateRailwaysNavigator; import de.mrjulsen.crn.block.blockentity.AdvancedDisplayBlockEntity; import de.mrjulsen.crn.block.blockentity.AdvancedDisplayBlockEntity.EUpdateReason; +import de.mrjulsen.crn.block.display.properties.TrainDestinationCompactSettings; import de.mrjulsen.crn.client.ber.AdvancedDisplayRenderInstance; -import de.mrjulsen.crn.client.ber.IBERRenderSubtype; -import de.mrjulsen.crn.client.lang.ELanguage; +import de.mrjulsen.crn.client.lang.CustomLanguage; import de.mrjulsen.mcdragonlib.client.ber.BERGraphics; import de.mrjulsen.mcdragonlib.client.ber.BERLabel; import de.mrjulsen.mcdragonlib.client.ber.BERLabel.BoundsHitReaction; @@ -16,10 +16,10 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; -public class BERTrainDestinationSimple implements IBERRenderSubtype { +public class BERTrainDestinationSimple implements AbstractAdvancedDisplayRenderer { - private final BERLabel outOfServiceLabel = new BERLabel(ELanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.not_in_service")) + private final BERLabel outOfServiceLabel = new BERLabel(CustomLanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.not_in_service")) .setPos(3, 6) .setScale(0.5f, 0.25f) .setYScale(0.5f) @@ -30,7 +30,6 @@ public class BERTrainDestinationSimple implements IBERRenderSubtype { currentPage = new RouteOverviewPage(this.route); String terminus = x.part().getNextStop().getTerminusText(); - setSlidingText(ELanguage.translate(keyTrainDetails, x.part().getNextStop().getTrainDisplayName(), terminus == null || terminus.isEmpty() ? x.part().getNextStop().getScheduleTitle() : terminus)); + setSlidingText(CustomLanguage.translate(keyTrainDetails, x.part().getNextStop().getTrainDisplayName(), terminus == null || terminus.isEmpty() ? x.part().getNextStop().getScheduleTitle() : terminus)); }); route.listen(ClientRoute.EVENT_FIRST_STOP_STATION_CHANGED, this, x -> { - setSlidingText(x.trainStop().getRealTimeStationTag().info().platform().isEmpty() ? ELanguage.translate(keyJourneyBegins) : ELanguage.translate(keyJourneyBeginsWithPlatform, x.trainStop().getRealTimeStationTag().info().platform())); + setSlidingText(x.trainStop().getRealTimeStationTag().info().platform().isEmpty() ? CustomLanguage.translate(keyJourneyBegins) : CustomLanguage.translate(keyJourneyBeginsWithPlatform, x.trainStop().getRealTimeStationTag().info().platform())); }); route.listen(ClientRoute.EVENT_ARRIVAL_AT_ANY_STOP, this, x -> { setSlidingText(TextUtils.text(x.trainStop().getClientTag().tagName())); @@ -113,17 +114,17 @@ public RouteDetailsOverlay(Level level, ClientRoute route, int width, int height } }); route.listen(ClientRoute.EVENT_ANNOUNCE_STOPOVER, this, x -> { - setSlidingText(ELanguage.translate(keyNextStop, x.trainStop().getClientTag().tagName())); + setSlidingText(CustomLanguage.translate(keyNextStop, x.trainStop().getClientTag().tagName())); }); route.listen(ClientRoute.EVENT_ANNOUNCE_LAST_STOP, this, x -> { - setSlidingText(ELanguage.translate(keyNextStop, x.trainStop().getClientTag().tagName())); + setSlidingText(CustomLanguage.translate(keyNextStop, x.trainStop().getClientTag().tagName())); }); route.listen(ClientRoute.EVENT_ANNOUNCE_TRANSFER_ARRIVAL_STATION, this, x -> { if (x.connection().isConnectionMissed()) { connectionMissed(); return; } - setSlidingText(ELanguage.translate(keyNextStop, x.trainStop().getClientTag().tagName()).append(" *** ").append(getTransferSlidingText(x.connection()))); + setSlidingText(CustomLanguage.translate(keyNextStop, x.trainStop().getClientTag().tagName()).append(" *** ").append(getTransferSlidingText(x.connection()))); currentPage = new TransferPage(this.route, x.connection()); }); route.listen(ClientRoute.EVENT_PART_CHANGED, this, x -> { @@ -136,7 +137,7 @@ public RouteDetailsOverlay(Level level, ClientRoute route, int width, int height currentPage = new TransferPage(this.route, x.connection()); }); route.listen(ClientRoute.EVENT_ARRIVAL_AT_LAST_STOP, this, x -> { - setSlidingText(ELanguage.translate(keyAfterJourney, x.trainStop().getClientTag().tagName())); + setSlidingText(CustomLanguage.translate(keyAfterJourney, x.trainStop().getClientTag().tagName())); currentPage = new JourneyCompletedPage(this.route, () -> currentPage = new NextConnectionsPage(route, () -> {} /*InstanceManager::removeRouteOverlay*/)); route.close(); }); @@ -144,7 +145,7 @@ public RouteDetailsOverlay(Level level, ClientRoute route, int width, int height if (journeyCompleted) { return; } - setSlidingText(ELanguage.translate(keyAfterJourney, x.trainStop().getClientTag().tagName())); + setSlidingText(CustomLanguage.translate(keyAfterJourney, x.trainStop().getClientTag().tagName())); currentPage = new JourneyCompletedPage(this.route, () -> currentPage = new NextConnectionsPage(route, () -> {} /*InstanceManager::removeRouteOverlay*/)); route.close(); }); @@ -159,17 +160,17 @@ public RouteDetailsOverlay(Level level, ClientRoute route, int width, int height private Component getTransferSlidingText(TransferConnection connection) { StationInfo info = connection.getDepartureStation().getRealTimeStationTag().info(); String terminus = connection.getDepartureStation().getDisplayTitle(); - return (info == null || info.platform().isBlank() ? ELanguage.translate(keyTransfer, connection.getDepartureStation().getTrainDisplayName(), terminus) : ELanguage.translate(keyTransferWithPlatform, connection.getDepartureStation().getTrainDisplayName(), terminus, info.platform())); + return (info == null || info.platform().isBlank() ? CustomLanguage.translate(keyTransfer, connection.getDepartureStation().getTrainDisplayName(), terminus) : CustomLanguage.translate(keyTransferWithPlatform, connection.getDepartureStation().getTrainDisplayName(), terminus, info.platform())); } private void connectionMissed() { - setSlidingText(ELanguage.translate(keyConnectionMissedInfo)); + setSlidingText(CustomLanguage.translate(keyConnectionMissedInfo)); currentPage = new ConnectionMissedPage(this.route); route.close(); } private void trainCancelled(String trainName) { - setSlidingText(ELanguage.translate(keyTrainCancelledInfo, trainName)); + setSlidingText(CustomLanguage.translate(keyTrainCancelledInfo, trainName)); currentPage = new TrainCancelledInfo(this.route, trainName); route.close(); } @@ -269,9 +270,9 @@ private void renderInternal(Graphics graphics, int x, int y, int width, int heig GuiUtils.drawTexture(GUI, graphics, x, y, GUI_WIDTH, GUI_HEIGHT, 0, currentPage != null && currentPage.isImportant() ? 138 : 0, 256, 256); GuiUtils.drawString(graphics, font, x + 6, y + 4, title, 0x4F4F4F, EAlignment.LEFT, false); - GuiUtils.drawString(graphics, font, x + 6, y + GUI_HEIGHT - 2 - font.lineHeight, TextUtils.translate(keyOptionsText, TextUtils.translate(InputConstants.getKey(Minecraft.ON_OSX ? InputConstants.KEY_LWIN : InputConstants.KEY_LCONTROL, 0).getName()).append(" + ").append(Component.keybind(keyKeybindOptions)).withStyle(ChatFormatting.BOLD)), 0x4F4F4F, EAlignment.LEFT, false); + GuiUtils.drawString(graphics, font, x + 6, y + GUI_HEIGHT - 2 - font.lineHeight, TextUtils.translate(keyOptionsText, TextUtils.translate(InputConstants.getKey(Minecraft.ON_OSX ? InputConstants.KEY_LWIN : InputConstants.KEY_LCONTROL, 0).getName()).append(" + ").append(TextUtils.keybind(keyKeybindOptions)).withStyle(ChatFormatting.BOLD)), 0x4F4F4F, EAlignment.LEFT, false); - String timeString = TimeUtils.parseTime((int)((level.getDayTime() + DragonLib.DAYTIME_SHIFT) % DragonLib.TICKS_PER_DAY), ModClientConfig.TIME_FORMAT.get()); + String timeString = TimeUtils.parseTime((int)((level.getDayTime() + DragonLib.daytimeShift()) % DragonLib.ticksPerDay()), ModClientConfig.TIME_FORMAT.get()); GuiUtils.drawString(graphics, font, x + GUI_WIDTH - 4 - font.width(timeString), y + 4, timeString, 0x4F4F4F, EAlignment.LEFT, false); renderSlidingText(graphics, x, y + 2, transX, transY); diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/overlay/pages/NextConnectionsPage.java b/common/src/main/java/de/mrjulsen/crn/client/gui/overlay/pages/NextConnectionsPage.java index 3a62722c..5369c7b0 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/overlay/pages/NextConnectionsPage.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/overlay/pages/NextConnectionsPage.java @@ -3,7 +3,7 @@ import java.util.ArrayList; import java.util.List; -import de.mrjulsen.crn.client.lang.ELanguage; +import de.mrjulsen.crn.client.lang.CustomLanguage; import de.mrjulsen.crn.config.ModClientConfig; import de.mrjulsen.crn.data.train.TrainStop; import de.mrjulsen.crn.registry.ModAccessorTypes; @@ -75,7 +75,7 @@ public void tick() { @Override public void renderMainLayer(Graphics graphics, int mouseX, int mouseY, float partialTicks) { - GuiUtils.drawString(graphics, font, 5, 4, ELanguage.translate(keyNextConnections).withStyle(ChatFormatting.BOLD), 0xFFFFFFFF, EAlignment.LEFT, false); + GuiUtils.drawString(graphics, font, 5, 4, CustomLanguage.translate(keyNextConnections).withStyle(ChatFormatting.BOLD), 0xFFFFFFFF, EAlignment.LEFT, false); int y = 16; final int spacing = 5; @@ -85,7 +85,7 @@ public void renderMainLayer(Graphics graphics, int mouseX, int mouseY, float par TrainStop stop = nextConnections.get(i); String terminus = stop.getDisplayTitle(); GuiUtils.drawString(graphics, font, 5, y, TimeUtils.parseTime(stop.getScheduledDepartureTime(), ModClientConfig.TIME_FORMAT.get()), 0xFFDBDBDB, EAlignment.LEFT, false); - GuiUtils.drawString(graphics, font, 5 + timeWidth + spacing, y, GuiUtils.ellipsisString(font, TextUtils.text(stop.getTrainName()), trainNameWidth), 0xFFDBDBDB, EAlignment.LEFT, false); + GuiUtils.drawString(graphics, font, 5 + timeWidth + spacing, y, GuiUtils.ellipsisString(font, TextUtils.text(stop.getTrainDisplayName()), trainNameWidth), 0xFFDBDBDB, EAlignment.LEFT, false); GuiUtils.drawString(graphics, font, width() - 5, y, stop.getRealTimeStationTag().info().platform(), 0xFFDBDBDB, EAlignment.RIGHT, false); int terminusWidth = width() - 10 + timeWidth + trainNameWidth + spacing * 3 - font.width(stop.getRealTimeStationTag().info().platform()); GuiUtils.drawString(graphics, font, 5 + timeWidth + trainNameWidth + spacing * 2, y, GuiUtils.ellipsisString(font, TextUtils.text(terminus), terminusWidth), 0xFFDBDBDB, EAlignment.LEFT, false); diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/overlay/pages/RouteOverviewPage.java b/common/src/main/java/de/mrjulsen/crn/client/gui/overlay/pages/RouteOverviewPage.java index 89c2899e..998e9fa0 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/overlay/pages/RouteOverviewPage.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/overlay/pages/RouteOverviewPage.java @@ -66,9 +66,9 @@ public void renderMainLayer(Graphics graphics, int mouseX, int mouseY, float par public static void renderStation(Graphics graphics, int y, int width, Font font, TrainStop stop, RoutePathIcons icon, boolean isStart, boolean isMissed) { final int precision = ModClientConfig.REALTIME_PRECISION_THRESHOLD.get(); - GuiUtils.drawString(graphics, font, 7, y + ENTRY_HEIGHT - 2 - font.lineHeight / 2, TextUtils.text(TimeUtils.parseTime((isStart ? stop.getScheduledDepartureTime() : stop.getScheduledArrivalTime()) + DragonLib.DAYTIME_SHIFT, ModClientConfig.TIME_FORMAT.get())).withStyle(isMissed ? ChatFormatting.STRIKETHROUGH : ChatFormatting.RESET), isMissed ? Constants.COLOR_DELAYED : 0xFFDBDBDB, EAlignment.LEFT, false); + GuiUtils.drawString(graphics, font, 7, y + ENTRY_HEIGHT - 2 - font.lineHeight / 2, TextUtils.text(TimeUtils.parseTime((isStart ? stop.getScheduledDepartureTime() : stop.getScheduledArrivalTime()) + DragonLib.daytimeShift(), ModClientConfig.TIME_FORMAT.get())).withStyle(isMissed ? ChatFormatting.STRIKETHROUGH : ChatFormatting.RESET), isMissed ? Constants.COLOR_DELAYED : 0xFFDBDBDB, EAlignment.LEFT, false); if (stop.shouldRenderRealTime() && !isMissed) { - GuiUtils.drawString(graphics, font, 7 + 32, y + ENTRY_HEIGHT - 2 - font.lineHeight / 2, TimeUtils.parseTime((isStart ? stop.getScheduledDepartureTime() + (stop.getDepartureTimeDeviation() / precision * precision) : stop.getScheduledArrivalTime() + (stop.getArrivalTimeDeviation() / precision * precision)) + DragonLib.DAYTIME_SHIFT, ModClientConfig.TIME_FORMAT.get()), stop.isArrivalDelayed() ? Constants.COLOR_DELAYED : Constants.COLOR_ON_TIME, EAlignment.LEFT, false); + GuiUtils.drawString(graphics, font, 7 + 32, y + ENTRY_HEIGHT - 2 - font.lineHeight / 2, TimeUtils.parseTime((isStart ? stop.getScheduledDepartureTime() + (stop.getDepartureTimeDeviation() / precision * precision) : stop.getScheduledArrivalTime() + (stop.getArrivalTimeDeviation() / precision * precision)) + DragonLib.daytimeShift(), ModClientConfig.TIME_FORMAT.get()), stop.isArrivalDelayed() ? Constants.COLOR_DELAYED : Constants.COLOR_ON_TIME, EAlignment.LEFT, false); } icon.getAsSprite().render(graphics, 10 + 64, y); GuiUtils.drawString(graphics, font, 17 + 64 + RoutePathIcons.SPRITE_WIDTH, y + ENTRY_HEIGHT - 2 - font.lineHeight / 2, GuiUtils.ellipsisString(font, TextUtils.text(stop.getClientTag().tagName()), width - (17 + 64 + RoutePathIcons.SPRITE_WIDTH) - font.width(stop.getRealTimeStationTag().info().platform()) - 10), 0xFFDBDBDB, EAlignment.LEFT, false); diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/overlay/pages/TransferPage.java b/common/src/main/java/de/mrjulsen/crn/client/gui/overlay/pages/TransferPage.java index 3ff0b2ea..69aeaab3 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/overlay/pages/TransferPage.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/overlay/pages/TransferPage.java @@ -2,7 +2,7 @@ import de.mrjulsen.crn.client.gui.ModGuiIcons; import de.mrjulsen.crn.client.gui.overlay.pages.RouteOverviewPage.RoutePathIcons; -import de.mrjulsen.crn.client.lang.ELanguage; +import de.mrjulsen.crn.client.lang.CustomLanguage; import de.mrjulsen.crn.data.StationTag.StationInfo; import de.mrjulsen.crn.data.navigation.ClientRoute; import de.mrjulsen.crn.data.navigation.TransferConnection; @@ -33,12 +33,12 @@ public TransferPage(ClientRoute route, TransferConnection connection) { StationInfo info = connection.getDepartureStation().getRealTimeStationTag().info(); this.messageLabel = MultiLineLabel.create(font, info.platform() == null || info.platform().isBlank() ? - ELanguage.translate(keyTransfer, - connection.getDepartureStation().getTrainName(), + CustomLanguage.translate(keyTransfer, + connection.getDepartureStation().getTrainDisplayName(), terminus ) : - ELanguage.translate(keyTransferWithPlatform, - connection.getDepartureStation().getTrainName(), + CustomLanguage.translate(keyTransferWithPlatform, + connection.getDepartureStation().getTrainDisplayName(), terminus, info.platform() ), width - (15 + ModGuiIcons.ICON_SIZE)); @@ -59,7 +59,7 @@ public void renderMainLayer(Graphics graphics, int mouseX, int mouseY, float par // Title ModGuiIcons.WALK.render(graphics, 5, y + 3); long transferTime = connection.getDepartureStation().getRealTimeDepartureTime() - DragonLib.getCurrentWorldTime(); - GuiUtils.drawString(graphics, font, 10 + ModGuiIcons.ICON_SIZE, y + 3 + ModGuiIcons.ICON_SIZE / 2 - font.lineHeight / 2, ELanguage.translate(keyScheduleTransfer).append(" ").append(transferTime > 0 ? TextUtils.text(TimeUtils.parseDurationShort((int)transferTime)) : ELanguage.translate(keyTimeNow)).withStyle(ChatFormatting.BOLD), 0xFFFFFFFF, EAlignment.LEFT, false); + GuiUtils.drawString(graphics, font, 10 + ModGuiIcons.ICON_SIZE, y + 3 + ModGuiIcons.ICON_SIZE / 2 - font.lineHeight / 2, CustomLanguage.translate(keyScheduleTransfer).append(" ").append(transferTime > 0 ? TextUtils.text(TimeUtils.parseDurationShort((int)transferTime)) : CustomLanguage.translate(keyTimeNow)).withStyle(ChatFormatting.BOLD), 0xFFFFFFFF, EAlignment.LEFT, false); y += 5 + ModGuiIcons.ICON_SIZE; // Details diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/overlay/pages/WelcomePage.java b/common/src/main/java/de/mrjulsen/crn/client/gui/overlay/pages/WelcomePage.java index b70b04ef..0f05376a 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/overlay/pages/WelcomePage.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/overlay/pages/WelcomePage.java @@ -3,7 +3,7 @@ import de.mrjulsen.crn.Constants; import de.mrjulsen.crn.client.gui.ModGuiIcons; import de.mrjulsen.crn.client.gui.overlay.pages.RouteOverviewPage.RoutePathIcons; -import de.mrjulsen.crn.client.lang.ELanguage; +import de.mrjulsen.crn.client.lang.CustomLanguage; import de.mrjulsen.crn.data.train.ClientTrainStop; import de.mrjulsen.crn.util.ModUtils; import de.mrjulsen.crn.data.navigation.ClientRoute; @@ -40,7 +40,7 @@ public void renderMainLayer(Graphics graphics, int mouseX, int mouseY, float par // Title ModGuiIcons.TIME.render(graphics, 5, y + 3); long time = route.getCurrentPart().departureIn(); - GuiUtils.drawString(graphics, font, 10 + ModGuiIcons.ICON_SIZE, y + 3 + ModGuiIcons.ICON_SIZE / 2 - font.lineHeight / 2, ELanguage.translate(keyDepartureIn).append(" ").append(time > 0 ? TextUtils.text(TimeUtils.parseDurationShort((int)time)) : ELanguage.translate(keyTimeNow)).withStyle(ChatFormatting.BOLD), 0xFFFFFFFF, EAlignment.LEFT, false); + GuiUtils.drawString(graphics, font, 10 + ModGuiIcons.ICON_SIZE, y + 3 + ModGuiIcons.ICON_SIZE / 2 - font.lineHeight / 2, CustomLanguage.translate(keyDepartureIn).append(" ").append(time > 0 ? TextUtils.text(TimeUtils.parseDurationShort((int)time)) : CustomLanguage.translate(keyTimeNow)).withStyle(ChatFormatting.BOLD), 0xFFFFFFFF, EAlignment.LEFT, false); y += 5 + ModGuiIcons.ICON_SIZE; // Details @@ -62,7 +62,7 @@ public void renderMainLayer(Graphics graphics, int mouseX, int mouseY, float par ModGuiIcons.INFO.render(graphics, 5, y + detailsLineHeight + font.lineHeight / 2 - ModGuiIcons.ICON_SIZE / 2); GuiUtils.drawString(graphics, font, 10 + ModGuiIcons.ICON_SIZE, y + detailsLineHeight, TextUtils.text(String.format("%s %s | %s", route.getTransferCount(), - ELanguage.translate(keyTransferCount).getString(), + CustomLanguage.translate(keyTransferCount).getString(), TimeUtils.parseDurationShort((int)route.travelTime()) )), 0xFFDBDBDB, EAlignment.LEFT, false); } diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/AbstractNavigatorScreen.java b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/AbstractNavigatorScreen.java index b94e1931..85fbe32d 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/AbstractNavigatorScreen.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/AbstractNavigatorScreen.java @@ -61,7 +61,7 @@ public void renderNavigatorBackground(Graphics graphics, int mouseX, int mouseY, renderScreenBackground(graphics); CreateDynamicWidgets.renderWindow(graphics, guiLeft, guiTop, GUI_WIDTH, GUI_HEIGHT, ContainerColor.GRAY, primaryColoring, FooterSize.DEFAULT.size(), FooterSize.SMALL.size(), false); GuiUtils.drawString(graphics, font, guiLeft + 6, guiTop + 4, getTitle(), 0x4F4F4F, EAlignment.LEFT, false); - String timeString = TimeUtils.parseTime((int)((Minecraft.getInstance().level.getDayTime() + DragonLib.DAYTIME_SHIFT) % DragonLib.TICKS_PER_DAY), ModClientConfig.TIME_FORMAT.get()); + String timeString = TimeUtils.parseTime((int)((Minecraft.getInstance().level.getDayTime() + DragonLib.daytimeShift()) % DragonLib.ticksPerDay()), ModClientConfig.TIME_FORMAT.get()); GuiUtils.drawString(graphics, font, guiLeft + GUI_WIDTH - 6, guiTop + 4, TextUtils.text(timeString), 0x4F4F4F, EAlignment.RIGHT, false); } diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/AdvancedDisplaySettingsScreen.java b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/AdvancedDisplaySettingsScreen.java index 7dc93f06..ae883215 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/AdvancedDisplaySettingsScreen.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/AdvancedDisplaySettingsScreen.java @@ -2,59 +2,80 @@ import java.util.Arrays; import java.util.List; - import com.simibubi.create.content.trains.station.NoShadowFontWrapper; import com.simibubi.create.foundation.gui.AllIcons; import com.simibubi.create.foundation.gui.element.GuiGameElement; -import com.simibubi.create.foundation.gui.widget.AbstractSimiWidget; -import com.simibubi.create.foundation.gui.widget.Label; import com.simibubi.create.foundation.gui.widget.ScrollInput; -import com.simibubi.create.foundation.utility.Components; +import com.simibubi.create.foundation.gui.widget.SelectionScrollInput; import de.mrjulsen.crn.Constants; import de.mrjulsen.crn.CreateRailwaysNavigator; import de.mrjulsen.crn.block.AbstractAdvancedSidedDisplayBlock; import de.mrjulsen.crn.block.blockentity.AdvancedDisplayBlockEntity; +import de.mrjulsen.crn.block.display.properties.AdvancedDisplaySettingsData; +import de.mrjulsen.crn.block.display.properties.IDisplaySettings; import de.mrjulsen.crn.block.properties.EDisplayType; import de.mrjulsen.crn.block.properties.ESide; import de.mrjulsen.crn.client.AdvancedDisplaysRegistry; import de.mrjulsen.crn.client.AdvancedDisplaysRegistry.DisplayTypeResourceKey; +import de.mrjulsen.crn.client.CRNGui; +import de.mrjulsen.crn.client.gui.CreateDynamicWidgets; +import de.mrjulsen.crn.client.gui.CreateDynamicWidgets.BarColor; +import de.mrjulsen.crn.client.gui.CreateDynamicWidgets.ContainerColor; +import de.mrjulsen.crn.client.gui.CreateDynamicWidgets.FooterSize; import de.mrjulsen.crn.client.gui.ModGuiIcons; import de.mrjulsen.crn.client.gui.widgets.DLCreateIconButton; -import de.mrjulsen.crn.client.gui.widgets.DLCreateLabel; import de.mrjulsen.crn.client.gui.widgets.DLCreateSelectionScrollInput; +import de.mrjulsen.crn.client.gui.widgets.IconSlotWidget; +import de.mrjulsen.crn.client.gui.widgets.ModernVerticalScrollBar; +import de.mrjulsen.crn.client.gui.widgets.modular.GuiBuilderContext; +import de.mrjulsen.crn.client.gui.widgets.modular.ModularWidgetContainer; import de.mrjulsen.crn.config.ModCommonConfig; import de.mrjulsen.crn.network.packets.cts.AdvancedDisplayUpdatePacket; import de.mrjulsen.mcdragonlib.DragonLib; import de.mrjulsen.mcdragonlib.client.gui.DLScreen; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLAbstractImageButton.ButtonType; import de.mrjulsen.mcdragonlib.client.gui.widgets.DLCheckBox; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLIconButton; import de.mrjulsen.mcdragonlib.client.gui.widgets.DLTooltip; +import de.mrjulsen.mcdragonlib.client.render.GuiIcons; +import de.mrjulsen.mcdragonlib.client.render.DynamicGuiRenderer.AreaStyle; import de.mrjulsen.mcdragonlib.client.util.Graphics; +import de.mrjulsen.mcdragonlib.client.util.GuiAreaDefinition; import de.mrjulsen.mcdragonlib.client.util.GuiUtils; +import de.mrjulsen.mcdragonlib.config.ECachingPriority; import de.mrjulsen.mcdragonlib.core.EAlignment; import de.mrjulsen.mcdragonlib.data.Cache; +import de.mrjulsen.mcdragonlib.data.Clipboard; +import de.mrjulsen.mcdragonlib.util.DLUtils; import de.mrjulsen.mcdragonlib.util.TextUtils; +import net.minecraft.ChatFormatting; import net.minecraft.Util; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; -import net.minecraft.client.gui.components.Widget; +import net.minecraft.client.gui.components.events.GuiEventListener; import net.minecraft.client.gui.screens.Screen; import net.minecraft.core.BlockPos; -import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; -import net.minecraft.network.chat.Style; -import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; public class AdvancedDisplaySettingsScreen extends DLScreen { + private static boolean advancedSettingsExpanded = false; + private static final MutableComponent title = TextUtils.translate("gui.createrailwaysnavigator.advanced_display_settings.title"); - private static final ResourceLocation GUI = new ResourceLocation(CreateRailwaysNavigator.MOD_ID, "textures/gui/advanced_display_settings.png"); private static final int GUI_WIDTH = 212; - private static final int GUI_HEIGHT = 123; private static final int DEFAULT_ICON_BUTTON_WIDTH = 18; private static final int DEFAULT_ICON_BUTTON_HEIGHT = 18; + private static final FooterSize headerSize = FooterSize.DEFAULT; + private static final FooterSize footerSize = FooterSize.SMALL; + private static final int BASIC_GUI_HEIGHT = headerSize.size() + footerSize.size() + 76 + 5 + DLIconButton.DEFAULT_BUTTON_HEIGHT; + private static final int EXTENDED_GUI_HEIGHT = 220; + + private static final int guiHeight() { + return advancedSettingsExpanded ? EXTENDED_GUI_HEIGHT : BASIC_GUI_HEIGHT; + } private final Font shadowlessFont; private final ItemStack renderedItem; @@ -64,13 +85,12 @@ public class AdvancedDisplaySettingsScreen extends DLScreen { private final BlockPos pos; private DisplayTypeResourceKey typeKey; private EDisplayType type; + private IDisplaySettings settings; private final boolean canBeDoubleSided; private boolean doubleSided; private ScrollInput infoTypeInput; - private Label infoTypeLabel; private ScrollInput displayTypeInput; - private Label displayTypeLabel; private DLCreateIconButton globalSettingsButton; private final MutableComponent tooltipGlobalSettings = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".navigator.global_settings.tooltip"); @@ -78,43 +98,227 @@ public class AdvancedDisplaySettingsScreen extends DLScreen { private final MutableComponent tooltipInfoType = TextUtils.translate("gui.createrailwaysnavigator.advanced_display_settings.info_type"); private final MutableComponent textDoubleSided = TextUtils.translate("gui.createrailwaysnavigator.advanced_display_settings.double_sided"); + @SuppressWarnings("resource") + private final MutableComponent textAdvancedSettings(int maxWidth) { + Font font = Minecraft.getInstance().font; + MutableComponent comp = TextUtils.translate("gui.createrailwaysnavigator.advanced_display_settings.advanced_settings").withStyle(ChatFormatting.BOLD); + MutableComponent ellipsisText = TextUtils.text("...").withStyle(ChatFormatting.BOLD); + final boolean tooWide = font.width(comp) + font.width(ellipsisText) > maxWidth; + return tooWide ? TextUtils.text(font.substrByWidth(comp, maxWidth - font.width(ellipsisText)).getString() + "...").withStyle(ChatFormatting.BOLD) : comp; + } + private int guiLeft, guiTop; + private GuiAreaDefinition workingArea; private DLCreateIconButton backButton; + private ModularWidgetContainer commonSettingsContainer; + private ModularWidgetContainer advancedSettingsContainer; - private final Cache> displayTypes = new Cache<>(() -> AdvancedDisplaysRegistry.getAllOfTypeAsKey(type)); + private final Cache> displayTypes = new Cache<>(() -> AdvancedDisplaysRegistry.getAllOfTypeAsKey(type), ECachingPriority.ALWAYS); + + private final AdvancedDisplayBlockEntity blockEntity; @SuppressWarnings("resource") public AdvancedDisplaySettingsScreen(AdvancedDisplayBlockEntity blockEntity) { super(title); + this.blockEntity = blockEntity; + this.settings = blockEntity.getSettings(); this.shadowlessFont = new NoShadowFontWrapper(Minecraft.getInstance().font); this.pos = blockEntity.getBlockPos(); this.level = blockEntity.getLevel(); - this.type = blockEntity.getDisplayTypeKey().category(); - this.typeKey = blockEntity.getDisplayTypeKey(); + this.type = blockEntity.getDisplayType().category(); + this.typeKey = blockEntity.getDisplayType(); this.renderedItem = new ItemStack(blockEntity.getBlockState().getBlock()); this.canBeDoubleSided = blockEntity.getBlockState().getBlock() instanceof AbstractAdvancedSidedDisplayBlock; this.doubleSided = !canBeDoubleSided || blockEntity.getBlockState().getValue(AbstractAdvancedSidedDisplayBlock.SIDE) == ESide.BOTH; } @Override - public void onClose() { - CreateRailwaysNavigator.net().CHANNEL.sendToServer(new AdvancedDisplayUpdatePacket(level, pos, typeKey, doubleSided)); + public void onClose() { + CreateRailwaysNavigator.net().CHANNEL.sendToServer(new AdvancedDisplayUpdatePacket(level, pos, typeKey, doubleSided, settings)); super.onClose(); } + private void reinit() { + this.clearWidgets(); + this.setFocused((GuiEventListener)null); + this.init(); + this.triggerImmediateNarration(false); + } + @Override protected void init() { - super.init(); + super.init(); + displayTypeInput = null; + infoTypeInput = null; + guiLeft = this.width / 2 - GUI_WIDTH / 2; - guiTop = this.height / 2 - GUI_HEIGHT / 2; + guiTop = this.height / 2 - guiHeight() / 2; + workingArea = new GuiAreaDefinition(guiLeft + 1, guiTop + headerSize.size(), GUI_WIDTH - 2, guiHeight() - headerSize.size() - footerSize.size()); + + // Content + ModernVerticalScrollBar scrollBar = new ModernVerticalScrollBar(this, 0, 0, 0, GuiAreaDefinition.empty()); + commonSettingsContainer = addRenderableWidget(new ModularWidgetContainer(this, workingArea.getX() + 2, workingArea.getY() + 1, workingArea.getWidth() - 4, 76, (w, builder) -> { + builder.addLine("type", (line) -> { + IconSlotWidget icon = line.add(new IconSlotWidget(line.getCurrentX(), line.y() + 2, type.getIcon().getAsSprite(16, 16))); + displayTypeInput = line.add(new DLCreateSelectionScrollInput(this, line.getCurrentX() + 6, line.getY() + 2, line.getRemainingWidth() - 6, 18) + .setRenderArrow(true) + .forOptions(Arrays.stream(EDisplayType.values()).map(x -> TextUtils.translate(x.getValueTranslationKey(CreateRailwaysNavigator.MOD_ID))).toList()) + .setState(type.getId()) + .titled(tooltipDisplayType) + .calling((i) -> { + type = EDisplayType.getTypeById(i); + icon.setIcon(type.getIcon().getAsSprite(16, 16)); + displayTypes.clear(); + displayTypeInput.addHint(TextUtils.translate(type.getValueInfoTranslationKey(CreateRailwaysNavigator.MOD_ID))); + + DLUtils.doIfNotNull((SelectionScrollInput)infoTypeInput, x -> { + x.setState(0); + x.forOptions(displayTypes.get().stream().map(a -> TextUtils.translate(a.getTranslationKey())).toList()); + x.onChanged(); + }); + }) + .addHint(TextUtils.translate(type.getValueInfoTranslationKey(CreateRailwaysNavigator.MOD_ID)))); + displayTypeInput.onChanged(); + }); + builder.addLine("variant", (line) -> { + line.add(new IconSlotWidget(line.getCurrentX(), line.y() + 2, ModGuiIcons.VERY_DETAILED.getAsSprite(16, 16))); + infoTypeInput = line.add(new DLCreateSelectionScrollInput(this, line.getCurrentX() + 6, line.getY() + 2, line.getRemainingWidth() - 6, 18) + .setRenderArrow(true) + .forOptions(displayTypes.get().stream().map(x -> TextUtils.translate(x.getTranslationKey())).toList()) + .setState(displayTypes.get().indexOf(typeKey))) + .titled(tooltipInfoType) + .calling((i) -> { + typeKey = displayTypes.get().get(i); + IDisplaySettings oldSettings = settings; + settings = blockEntity.getDisplayType().equals(typeKey) ? blockEntity.getSettings() : AdvancedDisplaysRegistry.createSettings(typeKey); + settings.onChangeSettings(oldSettings); + DLUtils.doIfNotNull(advancedSettingsContainer, ModularWidgetContainer::build); + }) + ; + infoTypeInput.onChanged(); + }); + builder.addLine("double_sided", (line) -> { + line.add(new IconSlotWidget(line.getCurrentX(), line.y() + 2, ModGuiIcons.DOUBLE_SIDED.getAsSprite(16, 16))); + line.add(new DLCheckBox(line.getCurrentX() + 6, line.getY() + 2, line.getRemainingWidth() - 6, textDoubleSided.getString(), doubleSided, (box) -> { + this.doubleSided = box.isChecked(); + })).active = canBeDoubleSided; + }); + }, scrollBar, 18, 18, 4, 4)); + addRenderableWidget(scrollBar); + + // Advanced Settings + final DLScreen screen = this; + DLIconButton copyBtn = null; + DLIconButton pasteBtn = null; + DLIconButton resetBtn = null; + + if (advancedSettingsExpanded) { + ModernVerticalScrollBar advancedSettingsScrollBar = new ModernVerticalScrollBar(this, 0, 0, 0, GuiAreaDefinition.empty()); + advancedSettingsContainer = addRenderableWidget(new ModularWidgetContainer(this, workingArea.getX() + 2, commonSettingsContainer.y() + commonSettingsContainer.height() + 3 + 18, workingArea.getWidth() - 4, workingArea.getHeight() - 2 - commonSettingsContainer.height() - 3 - 18, (w, builder) -> { + settings.buildGui(new GuiBuilderContext(builder, w)); + }, advancedSettingsScrollBar, 18, 18, 0, 4)); + advancedSettingsScrollBar.setScrollArea(GuiAreaDefinition.of(advancedSettingsContainer)); + addRenderableWidget(advancedSettingsScrollBar); + + copyBtn = addRenderableWidget(new DLIconButton( + ButtonType.DEFAULT, + AreaStyle.FLAT, + ModGuiIcons.COPY.getAsSprite(ModGuiIcons.ICON_SIZE, ModGuiIcons.ICON_SIZE), + workingArea.getX() + workingArea.getWidth() - 2 - DLIconButton.DEFAULT_BUTTON_WIDTH, + commonSettingsContainer.y() + commonSettingsContainer.height() + 3, + TextUtils.empty(), + (b) -> { + Clipboard.put(AdvancedDisplaySettingsData.class, new AdvancedDisplaySettingsData(typeKey, settings, doubleSided)); + } + ) { + @Override + public void renderFrontLayer(Graphics graphics, int mouseX, int mouseY, float partialTicks) { + super.renderFrontLayer(graphics, mouseX, mouseY, partialTicks); + if (!isMouseSelected()) { + return; + } + GuiUtils.renderTooltip(screen, this, List.of(Constants.TEXT_COPY), screen.width() / 3, graphics, mouseX, mouseY); + } + }); + copyBtn.setBackColor(0); + pasteBtn = addRenderableWidget(new DLIconButton( + ButtonType.DEFAULT, + AreaStyle.FLAT, + ModGuiIcons.PASTE.getAsSprite(ModGuiIcons.ICON_SIZE, ModGuiIcons.ICON_SIZE), + copyBtn.x() - DLIconButton.DEFAULT_BUTTON_WIDTH, + copyBtn.y(), + TextUtils.empty(), + (b) -> { + Clipboard.get(AdvancedDisplaySettingsData.class).ifPresent(x -> { + this.typeKey = x.getKey(); + this.type = x.getKey().category(); + this.settings = x.getSettings(); + this.doubleSided = x.isDoubleSided(); + reinit(); + }); + } + ) { + @Override + public void renderFrontLayer(Graphics graphics, int mouseX, int mouseY, float partialTicks) { + super.renderFrontLayer(graphics, mouseX, mouseY, partialTicks); + if (!isMouseSelected()) { + return; + } + GuiUtils.renderTooltip(screen, this, List.of(Constants.TEXT_PASTE), screen.width() / 3, graphics, mouseX, mouseY); + } + }); + pasteBtn.setBackColor(0); + resetBtn = addRenderableWidget(new DLIconButton( + ButtonType.DEFAULT, + AreaStyle.FLAT, + ModGuiIcons.REFRESH.getAsSprite(ModGuiIcons.ICON_SIZE, ModGuiIcons.ICON_SIZE), + pasteBtn.x() - DLIconButton.DEFAULT_BUTTON_WIDTH, + pasteBtn.y(), + TextUtils.empty(), + (b) -> { + settings = AdvancedDisplaysRegistry.createSettings(typeKey); + DLUtils.doIfNotNull(advancedSettingsContainer, ModularWidgetContainer::build); + } + ) { + @Override + public void renderFrontLayer(Graphics graphics, int mouseX, int mouseY, float partialTicks) { + super.renderFrontLayer(graphics, mouseX, mouseY, partialTicks); + if (!isMouseSelected()) { + return; + } + GuiUtils.renderTooltip(screen, this, List.of(Constants.TEXT_RESET), screen.width() / 3, graphics, mouseX, mouseY); + } + }); + resetBtn.setBackColor(0); + } - backButton = this.addRenderableWidget(new DLCreateIconButton(guiLeft + 179, guiTop + 99, DEFAULT_ICON_BUTTON_WIDTH, DEFAULT_ICON_BUTTON_HEIGHT, AllIcons.I_CONFIRM)); + DLIconButton expandCollapseBtn = addRenderableWidget(new DLIconButton( + ButtonType.DEFAULT, + AreaStyle.FLAT, + (advancedSettingsExpanded ? GuiIcons.ARROW_DOWN : GuiIcons.ARROW_RIGHT).getAsSprite(ModGuiIcons.ICON_SIZE, ModGuiIcons.ICON_SIZE), + workingArea.getX() + 2, + commonSettingsContainer.y() + commonSettingsContainer.height() + 3, + workingArea.getWidth() - 4 - (advancedSettingsExpanded ? copyBtn.width() + pasteBtn.width() + resetBtn.width() : 0), + DLIconButton.DEFAULT_BUTTON_HEIGHT, + TextUtils.empty(), + (b) -> { + advancedSettingsExpanded = !advancedSettingsExpanded; + reinit(); + } + )); + expandCollapseBtn.setMessage(textAdvancedSettings(expandCollapseBtn.width() - ModGuiIcons.ICON_SIZE - 6)); + expandCollapseBtn.setTextAlignment(EAlignment.LEFT); + expandCollapseBtn.setBackColor(0); + expandCollapseBtn.setFontColor(DragonLib.NATIVE_BUTTON_FONT_COLOR_ACTIVE); + + // Buttons + backButton = this.addRenderableWidget(new DLCreateIconButton(guiLeft + GUI_WIDTH - 7 - DEFAULT_ICON_BUTTON_WIDTH, guiTop + guiHeight() - 6 - DEFAULT_ICON_BUTTON_HEIGHT, DEFAULT_ICON_BUTTON_WIDTH, DEFAULT_ICON_BUTTON_HEIGHT, AllIcons.I_CONFIRM)); backButton.withCallback(() -> { onClose(); }); - DLCreateIconButton helpButton = this.addRenderableWidget(new DLCreateIconButton(guiLeft + 179 - DEFAULT_ICON_BUTTON_WIDTH - 10, guiTop + 99, DEFAULT_ICON_BUTTON_WIDTH, DEFAULT_ICON_BUTTON_HEIGHT, ModGuiIcons.HELP.getAsCreateIcon()) { + DLCreateIconButton helpButton = this.addRenderableWidget(new DLCreateIconButton(guiLeft + GUI_WIDTH - 17 - DEFAULT_ICON_BUTTON_WIDTH * 2, guiTop + guiHeight() - 6 - DEFAULT_ICON_BUTTON_HEIGHT, DEFAULT_ICON_BUTTON_WIDTH, DEFAULT_ICON_BUTTON_HEIGHT, ModGuiIcons.HELP.getAsCreateIcon()) { @Override public void onClick(double mouseX, double mouseY) { super.onClick(mouseX, mouseY); @@ -123,32 +327,10 @@ public void onClick(double mouseX, double mouseY) { }); addTooltip(DLTooltip.of(Constants.TEXT_HELP).assignedTo(helpButton)); - displayTypeLabel = addRenderableWidget(new DLCreateLabel(guiLeft + 45 + 5, guiTop + 23 + 5, Components.immutableEmpty()).withShadow()); - displayTypeInput = addRenderableWidget(new DLCreateSelectionScrollInput(guiLeft + 45, guiTop + 23, 138, 18) - .forOptions(Arrays.stream(EDisplayType.values()).map(x -> TextUtils.translate(x.getValueTranslationKey(CreateRailwaysNavigator.MOD_ID))).toList()) - .titled(tooltipDisplayType) - .writingTo(displayTypeLabel) - .calling((i) -> { - type = EDisplayType.getTypeById(i); - displayTypes.clear(); - createDisplayBrowser(); - displayTypeInput.addHint(displayTypeHint()); - }) - .addHint(displayTypeHint()) - .setState(type.getId())); - displayTypeInput.onChanged(); - - infoTypeLabel = addRenderableWidget(new DLCreateLabel(guiLeft + 45 + 5, guiTop + 45 + 5, Components.immutableEmpty()).withShadow()); - createDisplayBrowser(); - - addRenderableWidget(new DLCheckBox(guiLeft + 45, guiTop + 67 + 1, 138, textDoubleSided.getString(), doubleSided, (box) -> { - this.doubleSided = box.isChecked(); - })).active = canBeDoubleSided; - // Global Options Button if (minecraft.player.hasPermissions(ModCommonConfig.GLOBAL_SETTINGS_PERMISSION_LEVEL.get())) { final Screen instance = this; - globalSettingsButton = this.addRenderableWidget(new DLCreateIconButton(guiLeft + 7, guiTop + 99, DEFAULT_ICON_BUTTON_WIDTH, DEFAULT_ICON_BUTTON_HEIGHT, ModGuiIcons.SETTINGS.getAsCreateIcon()) { + globalSettingsButton = this.addRenderableWidget(new DLCreateIconButton(guiLeft + 7, guiTop + guiHeight() - 6 - DEFAULT_ICON_BUTTON_HEIGHT, DEFAULT_ICON_BUTTON_WIDTH, DEFAULT_ICON_BUTTON_HEIGHT, ModGuiIcons.SETTINGS.getAsCreateIcon()) { @Override public void onClick(double mouseX, double mouseY) { super.onClick(mouseX, mouseY); @@ -157,75 +339,31 @@ public void onClick(double mouseX, double mouseY) { }); addTooltip(DLTooltip.of(tooltipGlobalSettings).assignedTo(globalSettingsButton)); } - } - private void createDisplayBrowser() { - if (infoTypeInput != null) { - removeWidget(infoTypeInput); - } - infoTypeInput = new DLCreateSelectionScrollInput(guiLeft + 45, guiTop + 45, 138, 18) - .forOptions(displayTypes.get().stream().map(x -> TextUtils.translate(x.getTranslationKey())).toList()) - .titled(tooltipInfoType) - .writingTo(infoTypeLabel) - .calling((i) -> { - typeKey = displayTypes.get().get(i); - }) - .setState(displayTypes.get().indexOf(typeKey)); - infoTypeInput.onChanged(); - addRenderableWidget(infoTypeInput); - } - - private MutableComponent displayTypeHint() { - StringBuilder sb = new StringBuilder(); - font.getSplitter().splitLines(TextUtils.translate(typeKey.category().getValueInfoTranslationKey(CreateRailwaysNavigator.MOD_ID)), width() / 3, Style.EMPTY).forEach(x -> { - sb.append("\n" + x.getString()); - }); - return TextUtils.text(sb.toString()); } @Override public boolean isPauseScreen() { return false; } - - @Override - public void tick() { - super.tick(); - infoTypeInput.tick(); - displayTypeInput.tick(); - } @Override public void renderMainLayer(Graphics graphics, int pMouseX, int pMouseY, float pPartialTick) { renderScreenBackground(graphics); - GuiUtils.drawTexture(GUI, graphics, guiLeft, guiTop, 0, 0, GUI_WIDTH, GUI_HEIGHT); - GuiUtils.drawString(graphics, shadowlessFont, guiLeft + 6, guiTop + 4, title, DragonLib.NATIVE_UI_FONT_COLOR, EAlignment.LEFT, false); - - GuiGameElement.of(renderedItem).at(guiLeft + GUI_WIDTH, guiTop + GUI_HEIGHT - 48, -200) - .scale(4f) - .render(graphics.poseStack()); + CreateDynamicWidgets.renderWindow(graphics, guiLeft, guiTop, GUI_WIDTH, guiHeight(), ContainerColor.PURPLE, BarColor.GOLD, BarColor.GRAY, headerSize.size(), footerSize.size(), false); + CreateDynamicWidgets.renderVerticalSeparator(graphics, guiLeft + GUI_WIDTH - 31, guiTop + guiHeight() - footerSize.size() + 2, footerSize.size() - 4, BarColor.GRAY); + GuiUtils.drawTexture(CRNGui.GUI, graphics, guiLeft + GUI_WIDTH - 3, guiTop + guiHeight() - footerSize.size() / 2 - 9, 11, 18, 0, 12, 11, 18, CRNGui.GUI_WIDTH, CRNGui.GUI_HEIGHT); - type.getIcon().render(graphics, guiLeft + 22, guiTop + 24); - ModGuiIcons.VERY_DETAILED.render(graphics, guiLeft + 22, guiTop + 46); - ModGuiIcons.DOUBLE_SIDED.render(graphics, guiLeft + 22, guiTop + 68); + int commonHeight = commonSettingsContainer.getHeight() + 4; + CreateDynamicWidgets.renderContainer(graphics, workingArea.getX(), workingArea.getY() - 1, workingArea.getWidth(), commonHeight, ContainerColor.PURPLE); + CreateDynamicWidgets.renderContainer(graphics, workingArea.getX(), workingArea.getY() - 2 + commonHeight, workingArea.getWidth(), workingArea.getHeight() - commonHeight + 3, ContainerColor.GRAY); + GuiUtils.drawString(graphics, shadowlessFont, guiLeft + 6, guiTop + 4, title, DragonLib.NATIVE_UI_FONT_COLOR, EAlignment.LEFT, false); super.renderMainLayer(graphics, pMouseX, pMouseY, pPartialTick); - } - @Override - public void renderFrontLayer(Graphics graphics, int pMouseX, int pMouseY, float pPartialTick) { - super.renderFrontLayer(graphics, pMouseX, pMouseY, pPartialTick); - for (Widget widget : renderables) { - if (widget instanceof AbstractSimiWidget simiWidget && simiWidget.isHoveredOrFocused() - && simiWidget.visible) { - List tooltip = simiWidget.getToolTip(); - if (tooltip.isEmpty()) - continue; - int ttx = simiWidget.lockedTooltipX == -1 ? pMouseX : simiWidget.lockedTooltipX + simiWidget.x; - int tty = simiWidget.lockedTooltipY == -1 ? pMouseY : simiWidget.lockedTooltipY + simiWidget.y; - renderComponentTooltip(graphics.poseStack(), tooltip, ttx, tty); - } - } + GuiGameElement.of(renderedItem).at(guiLeft + GUI_WIDTH + 11, guiTop + guiHeight() - 48, -200) + .scale(4f) + .render(graphics.poseStack()); } } \ No newline at end of file diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/GlobalSettingsScreen.java b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/GlobalSettingsScreen.java index 092a0b0d..2de81de9 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/GlobalSettingsScreen.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/GlobalSettingsScreen.java @@ -140,7 +140,7 @@ private void addBlacklistedStationsWidget(List datalist, DLVerticalScrol GuiAreaDefinition workspace = option.getContentSpace(); DataListContainer, String> cont = new DataListContainer<>(option, workspace.getX(), workspace.getY(), workspace.getWidth(), datalist, (list) -> { - return list.iterator(); + return list.stream().sorted((a, b) -> a.compareToIgnoreCase(b)).iterator(); }, (data, entryWidget) -> { entryWidget.addDeleteButton((btn, tg, entry, refreshAction) -> { GlobalSettingsClient.removeStationFromBlacklist(entry, (res) -> { @@ -187,7 +187,7 @@ private void addBlacklistedTrainsWidget(List datalist, DLVerticalScrollB GuiAreaDefinition workspace = option.getContentSpace(); DataListContainer, String> cont = new DataListContainer<>(option, workspace.getX(), workspace.getY(), workspace.getWidth(), datalist, (list) -> { - return list.iterator(); + return list.stream().sorted((a, b) -> a.compareToIgnoreCase(b)).iterator(); }, (data, entryWidget) -> { entryWidget.addDeleteButton((btn, tg, entry, refreshAction) -> { GlobalSettingsClient.removeTrainFromBlacklist(entry, (res) -> { @@ -234,7 +234,7 @@ private void addTrainGroupsWidget(List datalist, DLVerticalScrollBar GuiAreaDefinition workspace = option.getContentSpace(); DataListContainer, TrainGroup> cont = new DataListContainer<>(option, workspace.getX(), workspace.getY(), workspace.getWidth(), datalist, (list) -> { - return list.iterator(); + return list.stream().sorted((a, b) -> a.getGroupName().compareToIgnoreCase(b.getGroupName())).iterator(); }, (data, entryWidget) -> { entryWidget.addDeleteButton((btn, tg, entry, refreshAction) -> { GlobalSettingsClient.deleteTrainGroup(entry.getGroupName(), () -> { @@ -246,7 +246,7 @@ private void addTrainGroupsWidget(List datalist, DLVerticalScrollBar DLIconButton colorBtn = entryWidget.addButton(ModGuiIcons.COLOR_PALETTE.getAsSprite(16, 16), textColor, (btn, tg, entry, refreshAction) -> { final TrainGroup e = entry; - FlyoutColorPicker flyout = new FlyoutColorPicker<>(this, e.getColor(), this::addRenderableWidget, (w) -> { + FlyoutColorPicker flyout = new FlyoutColorPicker<>(this, e.getColor(), Constants.DEFAULT_TRAIN_TYPE_COLORS, 5, true, true, this::addRenderableWidget, (w) -> { GlobalSettingsClient.updateTrainGroupColor(e.getGroupName(), ((FlyoutColorPicker)w).getColorPicker().getSelectedColor(), () -> { GlobalSettingsClient.getTrainGroups((res) -> { refreshAction.accept(Optional.ofNullable(res)); @@ -299,7 +299,7 @@ private void addTrainLinesWidget(List datalist, DLVerticalScrollBar s GuiAreaDefinition workspace = option.getContentSpace(); DataListContainer, TrainLine> cont = new DataListContainer<>(option, workspace.getX(), workspace.getY(), workspace.getWidth(), datalist, (list) -> { - return list.iterator(); + return list.stream().sorted((a, b) -> a.getLineName().compareToIgnoreCase(b.getLineName())).iterator(); }, (data, entryWidget) -> { entryWidget.addDeleteButton((btn, tg, entry, refreshAction) -> { GlobalSettingsClient.deleteTrainLine(entry.getLineName(), () -> { @@ -311,7 +311,7 @@ private void addTrainLinesWidget(List datalist, DLVerticalScrollBar s DLIconButton colorBtn = entryWidget.addButton(ModGuiIcons.COLOR_PALETTE.getAsSprite(16, 16), textColor, (btn, tg, entry, refreshAction) -> { final TrainLine e = entry; - FlyoutColorPicker flyout = new FlyoutColorPicker<>(this, e.getColor(), this::addRenderableWidget, (w) -> { + FlyoutColorPicker flyout = new FlyoutColorPicker<>(this, e.getColor(), Constants.DEFAULT_TRAIN_TYPE_COLORS, 5, true, true, this::addRenderableWidget, (w) -> { GlobalSettingsClient.updateTrainLineColor(e.getLineName(), ((FlyoutColorPicker)w).getColorPicker().getSelectedColor(), () -> { GlobalSettingsClient.getTrainLines((res) -> { refreshAction.accept(Optional.ofNullable(res)); diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/NavigatorScreen.java b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/NavigatorScreen.java index d4d62821..5d9afcca 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/NavigatorScreen.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/NavigatorScreen.java @@ -257,7 +257,7 @@ public void onClick(double mouseX, double mouseY) { DataAccessor.getFromServer(new NavigationData(stationFrom, stationTo, Minecraft.getInstance().player.getUUID()), ModAccessorTypes.NAVIGATE, (routeList) -> { routes.addAll(routeList); routeViewer.displayRoutes(ImmutableList.copyOf(routes)); - routeViewer.displayRoutes(routeList); + //routeViewer.displayRoutes(routeList); isLoadingRoutes = false; DataAccessor.getFromServer(null, ModAccessorTypes.ALL_TRAINS_INITIALIZED, (result) -> { diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/RouteDetailsScreen.java b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/RouteDetailsScreen.java index c376fc77..2a41c494 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/RouteDetailsScreen.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/RouteDetailsScreen.java @@ -20,7 +20,7 @@ import de.mrjulsen.crn.client.gui.widgets.DLCreateIndicator; import de.mrjulsen.crn.client.gui.widgets.ModernVerticalScrollBar; import de.mrjulsen.crn.client.gui.widgets.RouteDetailsViewer; -import de.mrjulsen.crn.client.lang.ELanguage; +import de.mrjulsen.crn.client.lang.CustomLanguage; import de.mrjulsen.crn.data.SavedRoutesManager; import de.mrjulsen.crn.data.navigation.ClientRoute; import de.mrjulsen.crn.event.ModCommonEvents; @@ -44,8 +44,9 @@ public class RouteDetailsScreen extends AbstractNavigatorScreen { - private final MutableComponent textDeparture = ELanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".route_details.departure"); - private final MutableComponent timeNowText = ELanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".time.now"); + private final MutableComponent textDeparture = CustomLanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".route_details.departure"); + private final MutableComponent textArrival = CustomLanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".route_details.arrival"); + private final MutableComponent timeNowText = CustomLanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".time.now"); private final MutableComponent tooltipSaveRoute = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".route_details.save_route.tooltip"); private final MutableComponent tooltipRemoveRoute = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".route_details.remove_route.tooltip"); private final MutableComponent tooltipShowPopup = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".route_details.show_popup.tooltip"); @@ -172,7 +173,7 @@ public void renderMainLayer(Graphics graphics, int mouseX, int mouseY, float par if (!route.isAnyCancelled()) { if (route.getStart().isDeparted()) { - GuiUtils.drawString(graphics, font, guiLeft + GUI_WIDTH / 2, guiTop + 19, "Ankunft in", 0xFFFFFF, EAlignment.CENTER, false); + GuiUtils.drawString(graphics, font, guiLeft + GUI_WIDTH / 2, guiTop + 19, textArrival, 0xFFFFFF, EAlignment.CENTER, false); } else { GuiUtils.drawString(graphics, font, guiLeft + GUI_WIDTH / 2, guiTop + 19, textDeparture, 0xFFFFFF, EAlignment.CENTER, false); } diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/TrainJourneySreen.java b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/TrainJourneyScreen.java similarity index 89% rename from common/src/main/java/de/mrjulsen/crn/client/gui/screen/TrainJourneySreen.java rename to common/src/main/java/de/mrjulsen/crn/client/gui/screen/TrainJourneyScreen.java index 23d26ab2..46af4de9 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/TrainJourneySreen.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/TrainJourneyScreen.java @@ -21,14 +21,14 @@ import net.minecraft.client.gui.screens.Screen; import net.minecraft.world.level.Level; -public class TrainJourneySreen extends AbstractNavigatorScreen { +public class TrainJourneyScreen extends AbstractNavigatorScreen { private final ClientRoute route; private final ClientRoutePart part; private RouteDetailsViewer viewer; - public TrainJourneySreen(Screen lastScreen, ClientRoute route, UUID trainId) { + public TrainJourneyScreen(Screen lastScreen, ClientRoute route, UUID trainId) { super(lastScreen, TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".journey_info.title"), BarColor.GOLD); this.route = route; this.part = route.getClientParts().stream().filter(x -> x.getTrainId().equals(trainId)).findFirst().orElse(route.getFirstClientPart()); @@ -66,7 +66,7 @@ public void renderMainLayer(Graphics graphics, int mouseX, int mouseY, float par int y = FooterSize.DEFAULT.size() - 1; CreateDynamicWidgets.renderContainer(graphics, guiLeft + 1, guiTop + y, GUI_WIDTH - 2, 32, ContainerColor.BLUE); GuiUtils.drawString(graphics, font, guiLeft + 8, guiTop + y + 7, TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".journey_info.date", (ModCommonEvents.getPhysicalLevel().dayTime() / Level.TICKS_PER_DAY)), DragonLib.NATIVE_BUTTON_FONT_COLOR_ACTIVE, EAlignment.LEFT, false); - GuiUtils.drawString(graphics, font, guiLeft + 8, guiTop + y + 18, TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".journey_info.train", part.getFirstStop().getTrainName(), part.getFirstStop().getTrainId().toString().split("-")[0], part.getFirstStop().getDisplayTitle()), DragonLib.NATIVE_BUTTON_FONT_COLOR_ACTIVE, EAlignment.LEFT, false); + GuiUtils.drawString(graphics, font, guiLeft + 8, guiTop + y + 18, TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".journey_info.train", part.getFirstStop().getTrainDisplayName(), part.getFirstStop().getTrainId().toString().split("-")[0], part.getFirstStop().getDisplayTitle()), DragonLib.NATIVE_BUTTON_FONT_COLOR_ACTIVE, EAlignment.LEFT, false); y += 32 - 1; CreateDynamicWidgets.renderContainer(graphics, guiLeft + 1, guiTop + y, GUI_WIDTH - 2, GUI_HEIGHT - y - FooterSize.SMALL.size() + 1, ContainerColor.GOLD); diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/TrainSectionSettingsScreen.java b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/TrainSectionSettingsScreen.java index ec310b75..7e8461ed 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/TrainSectionSettingsScreen.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/TrainSectionSettingsScreen.java @@ -148,7 +148,7 @@ public void onClick(double mouseX, double mouseY) { List groupsList = new ArrayList<>(trainGroups.stream().map(x -> TextUtils.text(x.getGroupName())).toList()); groupsList.add(0, textNone); displayTypeLabel = addRenderableWidget(new DLCreateLabel(guiLeft + 45 + 5, guiTop + 23 + 5, Components.immutableEmpty()).withShadow()); - displayTypeInput = addRenderableWidget(new DLCreateSelectionScrollInput(guiLeft + 45, guiTop + 23, 138, 18) + displayTypeInput = addRenderableWidget(new DLCreateSelectionScrollInput(this, guiLeft + 45, guiTop + 23, 138, 18) .forOptions(groupsList) .titled(tooltipTrainGroup) .writingTo(displayTypeLabel) @@ -162,7 +162,7 @@ public void onClick(double mouseX, double mouseY) { List linesList = new ArrayList<>(trainLines.stream().map(x -> TextUtils.text(x.getLineName())).toList()); linesList.add(0, textNone); infoTypeLabel = addRenderableWidget(new DLCreateLabel(guiLeft + 45 + 5, guiTop + 45 + 5, Components.immutableEmpty()).withShadow()); - infoTypeInput = addRenderableWidget(new DLCreateSelectionScrollInput(guiLeft + 45, guiTop + 45, 138, 18) + infoTypeInput = addRenderableWidget(new DLCreateSelectionScrollInput(this, guiLeft + 45, guiTop + 45, 138, 18) .forOptions(linesList) .titled(tooltipTrainLine) .writingTo(infoTypeLabel) diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/TrainSeparationSettingsScreen.java b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/TrainSeparationSettingsScreen.java new file mode 100644 index 00000000..ddebd7d5 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/TrainSeparationSettingsScreen.java @@ -0,0 +1,178 @@ +package de.mrjulsen.crn.client.gui.screen; + +import java.util.Arrays; + +import com.simibubi.create.content.trains.schedule.condition.TimedWaitCondition.TimeUnit; +import com.simibubi.create.foundation.gui.AllIcons; +import com.simibubi.create.foundation.utility.Lang; + +import de.mrjulsen.crn.Constants; +import de.mrjulsen.crn.CreateRailwaysNavigator; +import de.mrjulsen.crn.client.gui.CreateDynamicWidgets; +import de.mrjulsen.crn.client.gui.CreateDynamicWidgets.BarColor; +import de.mrjulsen.crn.client.gui.CreateDynamicWidgets.ContainerColor; +import de.mrjulsen.crn.client.gui.CreateDynamicWidgets.FooterSize; +import de.mrjulsen.crn.client.gui.ModGuiIcons; +import de.mrjulsen.crn.client.gui.widgets.DLCreateIconButton; +import de.mrjulsen.crn.client.gui.widgets.DLCreateScrollInput; +import de.mrjulsen.crn.client.gui.widgets.DLCreateSelectionScrollInput; +import de.mrjulsen.crn.client.gui.widgets.IconSlotWidget; +import de.mrjulsen.crn.client.gui.widgets.ModernVerticalScrollBar; +import de.mrjulsen.crn.client.gui.widgets.modular.ModularWidgetContainer; +import de.mrjulsen.crn.data.schedule.condition.TrainSeparationCondition; +import de.mrjulsen.crn.data.train.StationDepartureHistory.ETrainFilter; +import de.mrjulsen.mcdragonlib.DragonLib; +import de.mrjulsen.mcdragonlib.client.gui.DLScreen; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLTooltip; +import de.mrjulsen.mcdragonlib.client.util.Graphics; +import de.mrjulsen.mcdragonlib.client.util.GuiAreaDefinition; +import de.mrjulsen.mcdragonlib.client.util.GuiUtils; +import de.mrjulsen.mcdragonlib.core.EAlignment; +import de.mrjulsen.mcdragonlib.util.TextUtils; +import net.minecraft.Util; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.screens.Screen; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.MutableComponent; + +public class TrainSeparationSettingsScreen extends DLScreen { + + private static final MutableComponent title = TextUtils.translate(CreateRailwaysNavigator.MOD_ID + ".schedule.condition.train_separation.settings"); + private static final int GUI_WIDTH = 212; + private static final int DEFAULT_ICON_BUTTON_WIDTH = 18; + private static final int DEFAULT_ICON_BUTTON_HEIGHT = 18; + private static final FooterSize headerSize = FooterSize.DEFAULT; + private static final FooterSize footerSize = FooterSize.SMALL; + private static final int LINES = 2; + private static final int GUI_HEIGHT = headerSize.size() + footerSize.size() + 22 * LINES + 12; + + private int guiLeft, guiTop; + private GuiAreaDefinition workingArea; + + private DLCreateIconButton backButton; + private ModularWidgetContainer commonSettingsContainer; + + private final Screen lastScreen; + private final CompoundTag nbt; + + //private String stationFilter; + private int time = 5; + private TimeUnit timeUnit = TimeUnit.SECONDS; + private ETrainFilter filter = ETrainFilter.ANY; + + public TrainSeparationSettingsScreen(Screen lastScreen, CompoundTag nbt) { + super(title); + this.lastScreen = lastScreen; + this.nbt = nbt; + this.time = nbt.getInt(TrainSeparationCondition.NBT_TIME); + this.timeUnit = TimeUnit.values()[nbt.getInt(TrainSeparationCondition.NBT_TIME_UNIT)]; + this.filter = ETrainFilter.getByIndex(nbt.getByte(TrainSeparationCondition.NBT_TRAIN_FILTER)); + } + + @Override + public void onClose() { + super.onClose(); + nbt.putInt(TrainSeparationCondition.NBT_TIME, time); + nbt.putInt(TrainSeparationCondition.NBT_TIME_UNIT, timeUnit.ordinal()); + nbt.putByte(TrainSeparationCondition.NBT_TRAIN_FILTER, filter.getIndex()); + Minecraft.getInstance().setScreen(lastScreen); + } + + @Override + protected void init() { + super.init(); + + guiLeft = this.width / 2 - GUI_WIDTH / 2; + guiTop = this.height / 2 - GUI_HEIGHT / 2; + workingArea = new GuiAreaDefinition(guiLeft + 1, guiTop + headerSize.size(), GUI_WIDTH - 2, GUI_HEIGHT - headerSize.size() - footerSize.size()); + + // Content + ModernVerticalScrollBar scrollBar = new ModernVerticalScrollBar(this, 0, 0, 0, GuiAreaDefinition.empty()); + commonSettingsContainer = addRenderableWidget(new ModularWidgetContainer(this, workingArea.getX() + 2, workingArea.getY() + 1, workingArea.getWidth() - 4, 22 * LINES + 10, (w, builder) -> { + /* + builder.addLine("text", (line) -> { + line.add(new IconSlotWidget(line.getCurrentX(), line.y() + 2, ModGuiIcons.TEXT.getAsSprite(16, 16))); + line.add(new DLCreateTextBox(font, line.getCurrentX() + 6, line.getY() + 2, line.getRemainingWidth() - 6, TextUtils.empty())) + .setRenderArrow(true) + .setResponder((txt) -> { + this.stationFilter = txt; + }); + }); + */ + + builder.addLine("time", (line) -> { + line.add(new IconSlotWidget(line.getCurrentX(), line.y() + 2, ModGuiIcons.TIME.getAsSprite(16, 16))); + line.add(new DLCreateScrollInput(this, line.getCurrentX() + 6, line.getY() + 2, 30, 18) + .setRenderArrow(true) + .titled(Lang.translateDirect("generic.duration")) + .withShiftStep(15) + .withRange(0, 121) + .setState(time) + .calling(x -> { + time = x; + }) + ); + + line.add(new DLCreateSelectionScrollInput(this, line.getCurrentX() + 4, line.getY() + 2, 65, 18) + .forOptions(TimeUnit.translatedOptions()) + .setState(timeUnit.ordinal()) + .titled(Lang.translateDirect("generic.timeUnit")) + .setState(timeUnit.ordinal()) + .calling((i) -> { + timeUnit = TimeUnit.values()[i]; + }) + ); + }); + + builder.addLine("train_filter", (line) -> { + line.add(new IconSlotWidget(line.getCurrentX(), line.y() + 2, ModGuiIcons.TRAIN.getAsSprite(16, 16))); + line.add(new DLCreateSelectionScrollInput(this, line.getCurrentX() + 6, line.getY() + 2, line.getRemainingWidth() - 6, 18) + .setRenderArrow(true) + .forOptions(Arrays.stream(ETrainFilter.values()).map(x -> TextUtils.translate(x.getValueTranslationKey(CreateRailwaysNavigator.MOD_ID))).toList()) + .setState(filter.getIndex()) + .titled(TextUtils.translate(ETrainFilter.ANY.getEnumTranslationKey(CreateRailwaysNavigator.MOD_ID))) + .addHint(TextUtils.translate(ETrainFilter.ANY.getEnumDescriptionTranslationKey(CreateRailwaysNavigator.MOD_ID))) + .setState(filter.getIndex()) + .calling((i) -> { + filter = ETrainFilter.getByIndex(i); + }) + ); + }); + }, scrollBar, 18, 18, 4, 4)); + addRenderableWidget(scrollBar); + + // Buttons + backButton = this.addRenderableWidget(new DLCreateIconButton(guiLeft + GUI_WIDTH - 7 - DEFAULT_ICON_BUTTON_WIDTH, guiTop + GUI_HEIGHT - 6 - DEFAULT_ICON_BUTTON_HEIGHT, DEFAULT_ICON_BUTTON_WIDTH, DEFAULT_ICON_BUTTON_HEIGHT, AllIcons.I_CONFIRM)); + backButton.withCallback(() -> { + onClose(); + }); + + DLCreateIconButton helpButton = this.addRenderableWidget(new DLCreateIconButton(guiLeft + GUI_WIDTH - 17 - DEFAULT_ICON_BUTTON_WIDTH * 2, guiTop + GUI_HEIGHT - 6 - DEFAULT_ICON_BUTTON_HEIGHT, DEFAULT_ICON_BUTTON_WIDTH, DEFAULT_ICON_BUTTON_HEIGHT, ModGuiIcons.HELP.getAsCreateIcon()) { + @Override + public void onClick(double mouseX, double mouseY) { + super.onClick(mouseX, mouseY); + Util.getPlatform().openUri(Constants.HELP_PAGE_TRAIN_SEPARATION); + } + }); + addTooltip(DLTooltip.of(Constants.TEXT_HELP).assignedTo(helpButton)); + + } + + @Override + public boolean isPauseScreen() { + return false; + } + + @Override + public void renderMainLayer(Graphics graphics, int pMouseX, int pMouseY, float pPartialTick) { + renderScreenBackground(graphics); + CreateDynamicWidgets.renderWindow(graphics, guiLeft, guiTop, GUI_WIDTH, GUI_HEIGHT, ContainerColor.PURPLE, BarColor.GOLD, BarColor.GRAY, headerSize.size(), footerSize.size(), false); + CreateDynamicWidgets.renderVerticalSeparator(graphics, guiLeft + GUI_WIDTH - 31, guiTop + GUI_HEIGHT - footerSize.size() + 2, footerSize.size() - 4, BarColor.GRAY); + + int commonHeight = commonSettingsContainer.getHeight() + 4; + CreateDynamicWidgets.renderContainer(graphics, workingArea.getX(), workingArea.getY() - 1, workingArea.getWidth(), commonHeight, ContainerColor.PURPLE); + GuiUtils.drawString(graphics, font, guiLeft + 6, guiTop + 4, title, DragonLib.NATIVE_UI_FONT_COLOR, EAlignment.LEFT, false); + + super.renderMainLayer(graphics, pMouseX, pMouseY, pPartialTick); + } +} \ No newline at end of file diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/AbstractFlyoutWidget.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/AbstractFlyoutWidget.java index 92b7faeb..717d1a42 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/AbstractFlyoutWidget.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/AbstractFlyoutWidget.java @@ -9,8 +9,8 @@ import de.mrjulsen.crn.client.gui.CreateDynamicWidgets; import de.mrjulsen.crn.client.gui.CreateDynamicWidgets.ColorShade; import de.mrjulsen.mcdragonlib.client.gui.DLScreen; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLWidgetContainer; import de.mrjulsen.mcdragonlib.client.gui.widgets.IDragonLibWidget; -import de.mrjulsen.mcdragonlib.client.gui.widgets.WidgetContainer; import de.mrjulsen.mcdragonlib.client.util.Graphics; import de.mrjulsen.mcdragonlib.client.util.GuiAreaDefinition; import de.mrjulsen.mcdragonlib.client.util.GuiUtils; @@ -22,7 +22,7 @@ import net.minecraft.client.gui.narration.NarratableEntry; import net.minecraft.client.gui.narration.NarrationElementOutput; -public abstract class AbstractFlyoutWidget extends WidgetContainer { +public abstract class AbstractFlyoutWidget extends DLWidgetContainer { protected final DLScreen screen; protected final FlyoutPointer pointer; @@ -97,6 +97,7 @@ public void closeImmediately() { @Override public void renderMainLayer(Graphics graphics, int mouseX, int mouseY, float partialTicks) { graphics.poseStack().pushPose(); + graphics.poseStack().translate(0, 0, 100); RenderSystem.enableBlend(); RenderSystem.defaultBlendFunc(); RenderSystem.enableDepthTest(); diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/AbstractNotificationPopup.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/AbstractNotificationPopup.java index 9e10c75a..13d25b96 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/AbstractNotificationPopup.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/AbstractNotificationPopup.java @@ -8,14 +8,14 @@ import de.mrjulsen.crn.client.gui.CreateDynamicWidgets; import de.mrjulsen.crn.client.gui.CreateDynamicWidgets.ColorShade; import de.mrjulsen.mcdragonlib.client.gui.DLScreen; -import de.mrjulsen.mcdragonlib.client.gui.widgets.WidgetContainer; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLWidgetContainer; import de.mrjulsen.mcdragonlib.client.util.Graphics; import de.mrjulsen.mcdragonlib.client.util.GuiAreaDefinition; import de.mrjulsen.mcdragonlib.client.util.GuiUtils; import net.minecraft.client.gui.components.events.GuiEventListener; import net.minecraft.client.gui.narration.NarrationElementOutput; -public abstract class AbstractNotificationPopup extends WidgetContainer { +public abstract class AbstractNotificationPopup extends DLWidgetContainer { protected final DLScreen screen; protected final ColorShade shade; diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/CRNListBox.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/CRNListBox.java index 277dbf12..5723a413 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/CRNListBox.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/CRNListBox.java @@ -5,17 +5,17 @@ import java.util.Map; import java.util.Set; import java.util.Map.Entry; -import java.util.function.Function; +import java.util.function.BiFunction; import de.mrjulsen.mcdragonlib.client.gui.widgets.DLAbstractScrollBar; import de.mrjulsen.mcdragonlib.client.gui.widgets.DLButton; -import de.mrjulsen.mcdragonlib.client.gui.widgets.ScrollableWidgetContainer; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLScrollableWidgetContainer; import de.mrjulsen.mcdragonlib.client.util.Graphics; import de.mrjulsen.mcdragonlib.client.util.GuiUtils; import net.minecraft.client.gui.narration.NarrationElementOutput; import net.minecraft.client.gui.screens.Screen; -public class CRNListBox extends ScrollableWidgetContainer { +public class CRNListBox extends DLScrollableWidgetContainer { private final Screen parent; private final DLAbstractScrollBar scrollBar; @@ -29,7 +29,7 @@ public CRNListBox(Screen parent, int x, int y, int width, int height, DLAbstract scrollBar.setAutoScrollerSize(true); scrollBar.setScreenSize(height()); - scrollBar.updateMaxScroll(0); + scrollBar.setMaxScroll(0); scrollBar.withOnValueChanged((sb) -> setYScrollOffset(sb.getScrollValue())); scrollBar.setStepSize(10); } @@ -38,13 +38,14 @@ public Screen getParent() { return parent; } - public void displayData(List data, Function createItem) { + public void displayData(List data, BiFunction createItem) { clearWidgets(); values.clear(); contentHeight = 0; for (int i = 0; i < data.size(); i++) { T entry = data.get(i); - W widget = createItem.apply(entry); + W widget = createItem.apply(entry, i); + if (widget == null) continue; widget.set_x(x()); widget.set_width(width()); widget.set_y(y() + contentHeight); @@ -52,7 +53,7 @@ public void displayData(List data, Function createItem) { values.put(widget, entry); contentHeight += widget.height(); } - scrollBar.updateMaxScroll(contentHeight); + scrollBar.setMaxScroll(contentHeight); } public Set> getEntries() { diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/ColorPickerWidget.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/ColorPickerWidget.java index 94ac0b66..6fb421b7 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/ColorPickerWidget.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/ColorPickerWidget.java @@ -8,7 +8,7 @@ import de.mrjulsen.mcdragonlib.client.gui.DLColorPickerScreen; import de.mrjulsen.mcdragonlib.client.gui.DLScreen; import de.mrjulsen.mcdragonlib.client.gui.widgets.DLButton; -import de.mrjulsen.mcdragonlib.client.gui.widgets.WidgetContainer; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLWidgetContainer; import de.mrjulsen.mcdragonlib.client.util.Graphics; import de.mrjulsen.mcdragonlib.client.util.GuiAreaDefinition; import de.mrjulsen.mcdragonlib.client.util.GuiUtils; @@ -17,36 +17,42 @@ import net.minecraft.client.gui.narration.NarrationElementOutput; import net.minecraft.client.gui.screens.Screen; -public class ColorPickerWidget extends WidgetContainer { +public class ColorPickerWidget extends DLWidgetContainer { private int selectedColor = 0; - public ColorPickerWidget(Screen parent, int px, int py, int[] sampleColors, int maxColorsPerLine, int preselectedColor, Consumer onPick) { + public ColorPickerWidget(Screen parent, int px, int py, int[] sampleColors, int maxColorsPerLine, int preselectedColor, boolean allowCustom, boolean allowNone, Consumer onPick) { super(px, py, 1, 1); this.selectedColor = preselectedColor; int lines = (int)Math.ceil((double)sampleColors.length / (double)maxColorsPerLine); - set_height(18 * 2 + lines * 13 - 1); + set_height(18 * ((allowCustom ? 1 : 0) + (allowNone ? 1 : 0)) + lines * 13 - 1); set_width(maxColorsPerLine * 13 - 1); - addRenderableWidget(new ColorBrowserButton(x(), y(), width(), () -> selectedColor, (btn) -> { - DLScreen.setScreen(new DLColorPickerScreen(parent, selectedColor, c -> { - selectedColor = c.toInt(); - onPick.accept(this); - }, true)); - })); + int currentY = 0; + if (allowCustom) { + addRenderableWidget(new ColorBrowserButton(x(), y() + currentY, width(), () -> selectedColor, (btn) -> { + DLScreen.setScreen(new DLColorPickerScreen(parent, selectedColor, c -> { + selectedColor = c.toInt(); + onPick.accept(this); + }, true)); + })); + currentY += 18; + } for (int i = 0, y = 0; y < lines && i < sampleColors.length; y++) { for (int x = 0; x < maxColorsPerLine && i < sampleColors.length; x++, i++) { final int j = i; - addRenderableWidget(new ColorButton(x() + x * 13, y() + 18 + y * 13, sampleColors[j], btn -> { + addRenderableWidget(new ColorButton(x() + x * 13, y() + currentY + y * 13, sampleColors[j], btn -> { selectedColor = sampleColors[j]; onPick.accept(this); })); } } - addRenderableWidget(new NoColorButton(x(), y() + height() - 16, width(), (btn) -> { - selectedColor = 0; - onPick.accept(this); - })); + if (allowNone) { + addRenderableWidget(new NoColorButton(x(), y() + height() - 16, width(), (btn) -> { + selectedColor = 0; + onPick.accept(this); + })); + } } public int getSelectedColor() { diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/ColorSlotWidget.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/ColorSlotWidget.java new file mode 100644 index 00000000..94ccce1b --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/ColorSlotWidget.java @@ -0,0 +1,83 @@ +package de.mrjulsen.crn.client.gui.widgets; + +import java.util.List; +import java.util.function.Consumer; +import java.util.function.Supplier; + +import de.mrjulsen.crn.client.gui.widgets.flyouts.FlyoutColorPicker; +import de.mrjulsen.mcdragonlib.client.gui.DLScreen; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLButton; +import de.mrjulsen.mcdragonlib.client.render.DynamicGuiRenderer; +import de.mrjulsen.mcdragonlib.client.render.DynamicGuiRenderer.AreaStyle; +import de.mrjulsen.mcdragonlib.client.render.DynamicGuiRenderer.ButtonState; +import de.mrjulsen.mcdragonlib.client.util.Graphics; +import de.mrjulsen.mcdragonlib.client.util.GuiUtils; +import de.mrjulsen.mcdragonlib.util.DLUtils; +import de.mrjulsen.mcdragonlib.util.TextUtils; +import net.minecraft.network.chat.Component; + +public class ColorSlotWidget extends DLButton { + + public static final int SLOT_SIZE = 18; + + private final DLScreen parent; + private final List tooltip; + private final Supplier getScrollOffset; + private final Consumer onColorSelected; + private final int[] defaultColors; + private final boolean allowCustom; + private final boolean allowNone; + private int selectedColor; + + public ColorSlotWidget(DLScreen parent, int x, int y, int color, int[] defaultColors, boolean allowCustom, boolean allowNone, List tooltip, Supplier getScrollOffset, Consumer onColorSelected) { + super(x, y, SLOT_SIZE, SLOT_SIZE, TextUtils.empty()); + this.parent = parent; + this.getScrollOffset = getScrollOffset; + this.defaultColors = defaultColors; + this.allowCustom = allowCustom; + this.allowNone = allowNone; + this.onColorSelected = onColorSelected; + this.tooltip = tooltip; + this.selectedColor = color; + } + + @Override + public void onClick(double mouseX, double mouseY) { + FlyoutColorPicker flyout = new FlyoutColorPicker<>(parent, selectedColor, defaultColors, 8, allowCustom, allowNone, + (w) -> { + renderTooltip = false; + parent.addRenderableWidget(w); + }, + (w) -> { + renderTooltip = true; + this.selectedColor = ((FlyoutColorPicker)w).getColorPicker().getSelectedColor(); + DLUtils.doIfNotNull(onColorSelected, x -> x.accept(this)); + parent.removeWidget(w); + }); + flyout.setYOffset((int)-getScrollOffset.get()); + flyout.open(this); + } + + public int getSelectedColor() { + return selectedColor; + } + + @Override + public void renderMainLayer(Graphics graphics, int mouseX, int mouseY, float partialTick) { + DynamicGuiRenderer.renderArea(graphics, x(), y(), width(), height(), AreaStyle.GRAY, ButtonState.DOWN); + GuiUtils.fill(graphics, x() + 1, y() + 1, width() - 2, height() - 2, selectedColor); + if (isMouseSelected()) { + GuiUtils.fill(graphics, x() + 1, y() + 1, width() - 2, height() - 2, 0x40FFFFFF); + } + } + + private boolean renderTooltip = true; + @Override + public void renderFrontLayer(Graphics graphics, int mouseX, int mouseY, float partialTicks) { + if (!isMouseSelected() || !renderTooltip) { + return; + } + + GuiUtils.renderTooltip(parent, this, tooltip, parent.width() / 3, graphics, mouseX, mouseY); + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLCreateScrollInput.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLCreateScrollInput.java new file mode 100644 index 00000000..6aec9276 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLCreateScrollInput.java @@ -0,0 +1,168 @@ +package de.mrjulsen.crn.client.gui.widgets; + +import java.util.ArrayList; +import java.util.List; +import java.util.function.Function; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.simibubi.create.foundation.gui.widget.ScrollInput; +import de.mrjulsen.crn.client.gui.CreateDynamicWidgets; +import de.mrjulsen.mcdragonlib.DragonLib; +import de.mrjulsen.mcdragonlib.client.gui.DLScreen; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLContextMenu; +import de.mrjulsen.mcdragonlib.client.gui.widgets.IDragonLibWidget; +import de.mrjulsen.mcdragonlib.client.util.Graphics; +import de.mrjulsen.mcdragonlib.client.util.GuiUtils; +import de.mrjulsen.mcdragonlib.core.EAlignment; +import de.mrjulsen.mcdragonlib.data.Cache; +import de.mrjulsen.mcdragonlib.util.DLUtils; +import net.minecraft.client.Minecraft; +import net.minecraft.network.chat.Component; + +public class DLCreateScrollInput extends ScrollInput implements IDragonLibWidget { + + private boolean mouseSelected; + protected boolean renderArrow; + protected Function> onTooltip; + + protected final Cache> cachedTooltip = new Cache<>(() -> { + List tooltips = new ArrayList<>(getToolTip()); + DLUtils.doIfNotNull(onTooltip, x -> tooltips.addAll(onTooltip.apply(this))); + return tooltips; + }); + + protected final DLScreen parent; + + public DLCreateScrollInput(DLScreen parent, int x, int y, int width, int height) { + super(x, y, width, height); + this.parent = parent;; + } + + public DLCreateScrollInput setRenderArrow(boolean b) { + this.renderArrow = b; + return this; + } + + public DLCreateScrollInput onRenderTooltip(Function> action) { + this.onTooltip = action; + cachedTooltip.clear(); + return this; + } + + public boolean shouldRenderArrow() { + return renderArrow; + } + + public Component getText() { + return formatter.apply(state); + } + + @Override + protected void updateTooltip() { + super.updateTooltip(); + cachedTooltip.clear(); + } + + @Override + public final void render(PoseStack ms, int mouseX, int mouseY, float partialTicks) { + renderMainLayer(new Graphics(ms), mouseX, mouseY, partialTicks); + } + + @SuppressWarnings("resource") + @Override + public void renderMainLayer(Graphics graphics, int mouseX, int mouseY, float partialTicks) { + CreateDynamicWidgets.renderTextBox(graphics, x(), y(), width()); + if (shouldRenderArrow()) CreateDynamicWidgets.renderTextBoxArrow(graphics, x(), y()); + GuiUtils.drawString(graphics, Minecraft.getInstance().font, x() + 5, y() + 5, getText(), DragonLib.NATIVE_BUTTON_FONT_COLOR_ACTIVE, EAlignment.LEFT, true); + + } + + @Override + public void renderFrontLayer(Graphics graphics, int mouseX, int mouseY, float partialTicks) { + if (!isMouseSelected()) { + return; + } + GuiUtils.renderTooltip(parent, this, cachedTooltip.get(), parent.width() / 3, graphics, mouseX, mouseY); + } + + @Override + public void onFocusChangeEvent(boolean focus) {} + + @Override + public DLContextMenu getContextMenu() { + return null; + } + + @Override + public void setMenu(DLContextMenu menu) {} + + @Override + public boolean isMouseSelected() { + return mouseSelected; + } + + @Override + public void setMouseSelected(boolean selected) { + this.mouseSelected = selected; + } + + @Override + public int x() { + return x; + } + + @Override + public int y() { + return y; + } + + @Override + public void set_x(int x) { + this.x = x; + } + + @Override + public void set_y(int y) { + this.y = y; + } + + @Override + public void set_width(int w) { + this.width = w; + } + + @Override + public void set_height(int h) { + this.height = h; + } + + @Override + public void set_visible(boolean b) { + this.visible = b; + } + + @Override + public boolean visible() { + return visible; + } + + @Override + public void set_active(boolean b) { + this.active = b; + } + + @Override + public boolean active() { + return super.isActive(); + } + + @Override + public int width() { + return width; + } + + @Override + public int height() { + return height; + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLCreateSelectionScrollInput.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLCreateSelectionScrollInput.java index a9fd0c27..932821a1 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLCreateSelectionScrollInput.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLCreateSelectionScrollInput.java @@ -1,16 +1,113 @@ package de.mrjulsen.crn.client.gui.widgets; +import java.util.ArrayList; +import java.util.List; +import java.util.function.Function; + +import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.foundation.gui.widget.SelectionScrollInput; +import de.mrjulsen.crn.CreateRailwaysNavigator; +import de.mrjulsen.crn.client.gui.CreateDynamicWidgets; +import de.mrjulsen.crn.client.gui.CreateDynamicWidgets.ColorShade; +import de.mrjulsen.crn.client.gui.widgets.AbstractFlyoutWidget.FlyoutPointer; +import de.mrjulsen.crn.client.gui.widgets.flyouts.FlyoutScrollInput; +import de.mrjulsen.mcdragonlib.DragonLib; +import de.mrjulsen.mcdragonlib.client.gui.DLScreen; import de.mrjulsen.mcdragonlib.client.gui.widgets.DLContextMenu; import de.mrjulsen.mcdragonlib.client.gui.widgets.IDragonLibWidget; +import de.mrjulsen.mcdragonlib.client.util.Graphics; +import de.mrjulsen.mcdragonlib.client.util.GuiUtils; +import de.mrjulsen.mcdragonlib.core.EAlignment; +import de.mrjulsen.mcdragonlib.data.Cache; +import de.mrjulsen.mcdragonlib.util.DLUtils; +import de.mrjulsen.mcdragonlib.util.TextUtils; +import net.minecraft.ChatFormatting; +import net.minecraft.client.Minecraft; +import net.minecraft.network.chat.Component; public class DLCreateSelectionScrollInput extends SelectionScrollInput implements IDragonLibWidget { private boolean mouseSelected; + protected boolean renderArrow; + protected Function> onTooltip; + + protected final Cache> cachedTooltip = new Cache<>(() -> { + List tooltips = new ArrayList<>(getToolTip()); + tooltips.add(TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".common.click_to_search").withStyle(ChatFormatting.DARK_GRAY).withStyle(ChatFormatting.ITALIC)); + DLUtils.doIfNotNull(onTooltip, x -> tooltips.addAll(onTooltip.apply(this))); + return tooltips; + }); + + protected final DLScreen parent; + + public DLCreateSelectionScrollInput(DLScreen parent, int x, int y, int width, int height) { + super(x, y, width, height); + this.parent = parent;; + } + + public DLCreateSelectionScrollInput setRenderArrow(boolean b) { + this.renderArrow = b; + return this; + } - public DLCreateSelectionScrollInput(int xIn, int yIn, int widthIn, int heightIn) { - super(xIn, yIn, widthIn, heightIn); + public DLCreateSelectionScrollInput onRenderTooltip(Function> action) { + this.onTooltip = action; + cachedTooltip.clear(); + return this; + } + + public boolean shouldRenderArrow() { + return renderArrow; + } + + public Component getText() { + return formatter.apply(state); + } + + @Override + protected void updateTooltip() { + super.updateTooltip(); + cachedTooltip.clear(); + } + + public List getOptions() { + return options.stream().map(x -> (Component)x).toList(); + } + + @Override + public final void render(PoseStack ms, int mouseX, int mouseY, float partialTicks) { + renderMainLayer(new Graphics(ms), mouseX, mouseY, partialTicks); + } + + @SuppressWarnings("resource") + @Override + public void renderMainLayer(Graphics graphics, int mouseX, int mouseY, float partialTicks) { + CreateDynamicWidgets.renderTextBox(graphics, x(), y(), width()); + if (shouldRenderArrow()) CreateDynamicWidgets.renderTextBoxArrow(graphics, x(), y()); + GuiUtils.drawString(graphics, Minecraft.getInstance().font, x() + 5, y() + 5, getText(), DragonLib.NATIVE_BUTTON_FONT_COLOR_ACTIVE, EAlignment.LEFT, true); + + } + + boolean renderTooltip = true; + @Override + public void renderFrontLayer(Graphics graphics, int mouseX, int mouseY, float partialTicks) { + if (!isMouseSelected() || !renderTooltip) { + return; + } + GuiUtils.renderTooltip(parent, this, cachedTooltip.get(), parent.width() / 3, graphics, mouseX, mouseY); + } + + @Override + public void onClick(double mouseX, double mouseY) { + new FlyoutScrollInput<>(parent, FlyoutPointer.UP, ColorShade.DARK, (w) -> { + renderTooltip = false; + parent.addRenderableWidget(w); + }, (w) -> { + renderTooltip = true; + parent.removeWidget(w); + }, this).open(this); + super.onClick(mouseX, mouseY); } @Override diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLCreateTextBox.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLCreateTextBox.java new file mode 100644 index 00000000..25c29614 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLCreateTextBox.java @@ -0,0 +1,36 @@ +package de.mrjulsen.crn.client.gui.widgets; + +import com.mojang.blaze3d.vertex.PoseStack; + +import de.mrjulsen.crn.client.gui.CreateDynamicWidgets; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLEditBox; +import de.mrjulsen.mcdragonlib.client.util.Graphics; +import net.minecraft.client.gui.Font; +import net.minecraft.network.chat.Component; + +public class DLCreateTextBox extends DLEditBox { + + protected boolean renderArrow; + + public DLCreateTextBox(Font pFont, int pX, int pY, int pWidth, Component pMessage) { + super(pFont, pX + 5, pY + 5, pWidth - 10, 13, pMessage); + this.setBordered(false); + } + + public DLCreateTextBox setRenderArrow(boolean b) { + this.renderArrow = b; + return this; + } + + public boolean shouldRenderArrow() { + return renderArrow; + } + + @Override + public void renderButton(PoseStack ms, int mouseX, int mouseY, float partialTicks) { + Graphics graphics = new Graphics(ms); + CreateDynamicWidgets.renderTextBox(graphics, x() - 5, y() - 5, width() + 10); + if (shouldRenderArrow()) CreateDynamicWidgets.renderTextBoxArrow(graphics, x() - 5, y() - 5); + super.renderButton(ms, mouseX, mouseY, partialTicks); + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLLabel.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLLabel.java new file mode 100644 index 00000000..3b1579b5 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLLabel.java @@ -0,0 +1,116 @@ +package de.mrjulsen.crn.client.gui.widgets; + +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLRenderable; +import de.mrjulsen.mcdragonlib.client.util.Graphics; +import de.mrjulsen.mcdragonlib.client.util.GuiUtils; +import de.mrjulsen.mcdragonlib.core.EAlignment; +import de.mrjulsen.mcdragonlib.data.Cache; +import de.mrjulsen.mcdragonlib.util.TextUtils; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.Font; +import net.minecraft.network.chat.Component; + +public class DLLabel extends DLRenderable { + + protected final Font font = Minecraft.getInstance().font; + protected boolean autoWidth; + protected boolean autoHeight; + private Component text = TextUtils.empty(); + private int tint = 0xFFFFFFFF; + private EAlignment alignment = EAlignment.CENTER; + private boolean drawShadow = true; + + + public DLLabel(int x, int y, int width, int height, Component text) { + super(x, y, width, height); + this.text = text; + } + + public DLLabel setAutoSize(boolean b) { + this.autoWidth = b; + this.autoHeight = b; + return this; + } + + public DLLabel setAutoWidth(boolean b) { + this.autoWidth = b; + return this; + } + + public DLLabel setAutoHeight(boolean b) { + this.autoHeight = b; + return this; + } + + public DLLabel setText(Component text) { + this.text = text; + updateSize(); + return this; + } + + public DLLabel setTint(int tint) { + this.tint = tint; + updateSize(); + return this; + } + + public DLLabel setAlignment(EAlignment alignment) { + this.alignment = alignment; + updateSize(); + return this; + } + + public DLLabel setDrawShadow(boolean b) { + this.drawShadow = b; + return this; + } + + public boolean isAutoWidth() { + return autoWidth; + } + + public boolean isAutoHeight() { + return autoHeight; + } + + public boolean isAutoSize() { + return isAutoWidth() || isAutoHeight(); + } + + public Component getText() { + return text; + } + + public int getTint() { + return tint; + } + + public EAlignment getAlignment() { + return alignment; + } + + public boolean isDrawShadow() { + return drawShadow; + } + + protected void updateSize() { + if (this.autoWidth) this.set_width(font.width(text)); + if (this.autoHeight) this.set_height(font.lineHeight); + } + + private final Cache textCache = new Cache<>(() -> { + final boolean tooWide = font.width(getText()) > width(); + return tooWide ? TextUtils.text(font.substrByWidth(getText(), width()).getString() + "...") : getText(); + }); + + @Override + public void renderMainLayer(Graphics graphics, int mouseX, int mouseY, float partialTicks) { + EAlignment align = getAlignment(); + int x = x() + switch (align) { + case RIGHT -> width(); + case CENTER -> width() / 2; + default -> 0; + }; + GuiUtils.drawString(graphics, font, x, y() + height() / 2 - font.lineHeight / 2, textCache.get(), getTint(), getAlignment(), isDrawShadow()); + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/IconSlotWidget.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/IconSlotWidget.java new file mode 100644 index 00000000..c05b94b9 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/IconSlotWidget.java @@ -0,0 +1,31 @@ +package de.mrjulsen.crn.client.gui.widgets; + +import de.mrjulsen.crn.client.gui.CreateDynamicWidgets; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLRenderable; +import de.mrjulsen.mcdragonlib.client.render.Sprite; +import de.mrjulsen.mcdragonlib.client.util.Graphics; +import de.mrjulsen.mcdragonlib.util.DLUtils; + +public class IconSlotWidget extends DLRenderable { + + private Sprite icon; + + public IconSlotWidget(int x, int y, Sprite icon) { + super(x, y, 18, 18); + this.icon = icon; + } + + public void setIcon(Sprite icon) { + this.icon = icon; + } + + public Sprite getIcon() { + return icon; + } + + @Override + public void renderMainLayer(Graphics graphics, int mouseX, int mouseY, float partialTicks) { + CreateDynamicWidgets.renderIconSlot(graphics, x(), y(), width(), height()); + DLUtils.doIfNotNull(icon, x -> x.render(graphics, x() + (width() / 2 - icon.getWidth() / 2), y() + (height() / 2 - icon.getHeight() / 2))); + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/RouteDetailsViewer.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/RouteDetailsViewer.java index 0bef955b..787b0139 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/RouteDetailsViewer.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/RouteDetailsViewer.java @@ -15,13 +15,13 @@ import de.mrjulsen.crn.data.navigation.RoutePart; import de.mrjulsen.crn.data.navigation.TransferConnection; import de.mrjulsen.mcdragonlib.client.gui.widgets.DLAbstractScrollBar; -import de.mrjulsen.mcdragonlib.client.gui.widgets.ScrollableWidgetContainer; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLScrollableWidgetContainer; import de.mrjulsen.mcdragonlib.client.util.Graphics; import de.mrjulsen.mcdragonlib.client.util.GuiUtils; import net.minecraft.client.gui.narration.NarrationElementOutput; import net.minecraft.client.gui.screens.Screen; -public class RouteDetailsViewer extends ScrollableWidgetContainer { +public class RouteDetailsViewer extends DLScrollableWidgetContainer { private final DLAbstractScrollBar scrollBar; private int contentHeight = 0; @@ -40,7 +40,7 @@ public RouteDetailsViewer(Screen parent, int x, int y, int width, int height, DL scrollBar.setAutoScrollerSize(true); scrollBar.setScreenSize(height()); - scrollBar.updateMaxScroll(0); + scrollBar.setMaxScroll(0); scrollBar.withOnValueChanged((sb) -> setYScrollOffset(sb.getScrollValue())); scrollBar.setStepSize(10); } @@ -59,6 +59,7 @@ public void displayRouteInternal(ClientRoute route, List parts, Queue connections = new ConcurrentLinkedQueue<>(route.getConnections()); for (int i = 0; i < parts.size(); i++) { ClientRoutePart part = parts.get(i); + RoutePartWidget widget = new RoutePartWidget(parent, x(), y() + contentHeight, width(), route, part); widget.setShowTrainDetails(showTrainDetails); widget.setCanExpandCollapse(canExpandCollapse); @@ -78,7 +79,7 @@ public void displayRouteInternal(ClientRoute route, List parts, } contentHeight += 10; - scrollBar.updateMaxScroll(contentHeight); + scrollBar.setMaxScroll(contentHeight); } @Override diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/RouteViewer.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/RouteViewer.java index 0c13edad..3eb522d5 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/RouteViewer.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/RouteViewer.java @@ -4,13 +4,13 @@ import de.mrjulsen.crn.data.navigation.ClientRoute; import de.mrjulsen.mcdragonlib.client.gui.widgets.DLAbstractScrollBar; -import de.mrjulsen.mcdragonlib.client.gui.widgets.ScrollableWidgetContainer; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLScrollableWidgetContainer; import de.mrjulsen.mcdragonlib.client.util.Graphics; import de.mrjulsen.mcdragonlib.client.util.GuiUtils; import net.minecraft.client.gui.narration.NarrationElementOutput; import net.minecraft.client.gui.screens.Screen; -public class RouteViewer extends ScrollableWidgetContainer { +public class RouteViewer extends DLScrollableWidgetContainer { private final Screen parent; private final DLAbstractScrollBar scrollBar; @@ -23,7 +23,7 @@ public RouteViewer(Screen parent, int x, int y, int width, int height, DLAbstrac scrollBar.setAutoScrollerSize(true); scrollBar.setScreenSize(height()); - scrollBar.updateMaxScroll(0); + scrollBar.setMaxScroll(0); scrollBar.withOnValueChanged((sb) -> setYScrollOffset(sb.getScrollValue())); scrollBar.setStepSize(10); } @@ -41,7 +41,7 @@ public void displayRoutes(List routes) { contentHeight += (RouteWidget.HEIGHT + 3); } contentHeight += 2; - scrollBar.updateMaxScroll(contentHeight); + scrollBar.setMaxScroll(contentHeight); } @Override diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/RouteWidget.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/RouteWidget.java index 8ba80431..c4da9541 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/RouteWidget.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/RouteWidget.java @@ -9,7 +9,7 @@ import de.mrjulsen.crn.client.gui.CreateDynamicWidgets; import de.mrjulsen.crn.client.gui.CreateDynamicWidgets.ColorShade; import de.mrjulsen.crn.client.gui.screen.RouteDetailsScreen; -import de.mrjulsen.crn.client.lang.ELanguage; +import de.mrjulsen.crn.client.lang.CustomLanguage; import de.mrjulsen.crn.config.ModClientConfig; import de.mrjulsen.crn.data.SavedRoutesManager; import de.mrjulsen.crn.data.navigation.ClientRoute; @@ -41,9 +41,9 @@ public class RouteWidget extends DLButton { private final ClientRoute route; - private final MutableComponent transferText = ELanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".navigator.route_entry.transfer"); - private final MutableComponent connectionInPast = ELanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".navigator.route_entry.connection_in_past"); - private final MutableComponent trainCanceled = ELanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".route_overview.stop_cancelled"); + private final MutableComponent transferText = CustomLanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".navigator.route_entry.transfer"); + private final MutableComponent connectionInPast = CustomLanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".navigator.route_entry.connection_in_past"); + private final MutableComponent trainCanceled = CustomLanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".route_overview.stop_cancelled"); private final MutableComponent textShowDetails = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".route_widget.show_details"); private final MutableComponent textSave = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".route_widget.save"); private final MutableComponent textShare = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".route_widget.share"); @@ -84,8 +84,8 @@ public void renderMainLayer(Graphics graphics, int pMouseX, int pMouseY, float p ImmutableList parts = route.getParts(); Font shadowlessFont = new NoShadowFontWrapper(minecraft.font); - String timeStart = TimeUtils.parseTime((int)((route.getStart().getScheduledDepartureTime() + DragonLib.DAYTIME_SHIFT) % DragonLib.TICKS_PER_DAY), ModClientConfig.TIME_FORMAT.get()); - String timeEnd = TimeUtils.parseTime((int)((route.getEnd().getScheduledArrivalTime() + DragonLib.DAYTIME_SHIFT) % DragonLib.TICKS_PER_DAY), ModClientConfig.TIME_FORMAT.get()); + String timeStart = TimeUtils.parseTime((int)((route.getStart().getScheduledDepartureTime() + DragonLib.daytimeShift()) % DragonLib.ticksPerDay()), ModClientConfig.TIME_FORMAT.get()); + String timeEnd = TimeUtils.parseTime((int)((route.getEnd().getScheduledArrivalTime() + DragonLib.daytimeShift()) % DragonLib.ticksPerDay()), ModClientConfig.TIME_FORMAT.get()); String dash = " - "; MutableComponent summary = TextUtils.text(String.format("%s%s%s | %s %s | %s", timeStart, @@ -128,10 +128,10 @@ public void renderMainLayer(Graphics graphics, int pMouseX, int pMouseY, float p GuiUtils.drawString(graphics, font, (int)((x + 6) / scale), (int)((y + 43) / scale), TextUtils.text(route.getStart().getClientTag().tagName()), 0xDBDBDB, EAlignment.LEFT, false); GuiUtils.drawString(graphics, font, (int)((x + WIDTH - 6) / scale) - textW, (int)((y + 43) / scale), TextUtils.text(endStationName), 0xDBDBDB, EAlignment.LEFT, false); if (route.getStart().shouldRenderRealTime()) { - GuiUtils.drawString(graphics, font, (int)((x + 6 + font.width(timeStart) * localScale / 2.0f) / scale) - font.width(timeStart) / 2, (int)((y + 15) / scale), TextUtils.text(TimeUtils.parseTime((int)((route.getStart().getScheduledDepartureTime() + (route.getStart().getDepartureTimeDeviation() / precision * precision)) % 24000 + DragonLib.DAYTIME_SHIFT), ModClientConfig.TIME_FORMAT.get())), route.getStart().isDepartureDelayed() ? Constants.COLOR_DELAYED : Constants.COLOR_ON_TIME, EAlignment.LEFT, false); + GuiUtils.drawString(graphics, font, (int)((x + 6 + font.width(timeStart) * localScale / 2.0f) / scale) - font.width(timeStart) / 2, (int)((y + 15) / scale), TextUtils.text(TimeUtils.parseTime((int)((route.getStart().getScheduledDepartureTime() + (route.getStart().getDepartureTimeDeviation() / precision * precision)) % 24000 + DragonLib.daytimeShift()), ModClientConfig.TIME_FORMAT.get())), route.getStart().isDepartureDelayed() ? Constants.COLOR_DELAYED : Constants.COLOR_ON_TIME, EAlignment.LEFT, false); } if (route.getEnd().shouldRenderRealTime()) { - GuiUtils.drawString(graphics, font, (int)((x + 6 + font.width(timeEnd) * localScale * 1.5f + (font.width(dash)) * localScale) / scale) - font.width(timeEnd) / 2, (int)((y + 15) / scale), TextUtils.text(TimeUtils.parseTime((int)((route.getEnd().getScheduledArrivalTime() + (route.getEnd().getArrivalTimeDeviation() / precision * precision)) % 24000 + DragonLib.DAYTIME_SHIFT), ModClientConfig.TIME_FORMAT.get())), route.getEnd().isArrivalDelayed() ? Constants.COLOR_DELAYED : Constants.COLOR_ON_TIME, EAlignment.LEFT, false); + GuiUtils.drawString(graphics, font, (int)((x + 6 + font.width(timeEnd) * localScale * 1.5f + (font.width(dash)) * localScale) / scale) - font.width(timeEnd) / 2, (int)((y + 15) / scale), TextUtils.text(TimeUtils.parseTime((int)((route.getEnd().getScheduledArrivalTime() + (route.getEnd().getArrivalTimeDeviation() / precision * precision)) % 24000 + DragonLib.daytimeShift()), ModClientConfig.TIME_FORMAT.get())), route.getEnd().isArrivalDelayed() ? Constants.COLOR_DELAYED : Constants.COLOR_ON_TIME, EAlignment.LEFT, false); } if (route.isAnyCancelled()) { diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/SavedRouteWidget.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/SavedRouteWidget.java index 55618ca5..194584b4 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/SavedRouteWidget.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/SavedRouteWidget.java @@ -5,7 +5,7 @@ import de.mrjulsen.crn.client.gui.CreateDynamicWidgets; import de.mrjulsen.crn.client.gui.CreateDynamicWidgets.ColorShade; import de.mrjulsen.crn.client.gui.screen.RouteDetailsScreen; -import de.mrjulsen.crn.client.lang.ELanguage; +import de.mrjulsen.crn.client.lang.CustomLanguage; import de.mrjulsen.crn.data.ISaveableNavigatorData; import de.mrjulsen.crn.data.SavedRoutesManager; import de.mrjulsen.crn.data.ISaveableNavigatorData.SaveableNavigatorDataLine; @@ -37,9 +37,9 @@ public class SavedRouteWidget extends DLButton { private final ISaveableNavigatorData data; - private final MutableComponent transferText = ELanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".navigator.route_entry.transfer"); - private final MutableComponent connectionInPast = ELanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".navigator.route_entry.connection_in_past"); - private final MutableComponent trainCanceled = ELanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".route_overview.stop_cancelled"); + private final MutableComponent transferText = CustomLanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".navigator.route_entry.transfer"); + private final MutableComponent connectionInPast = CustomLanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".navigator.route_entry.connection_in_past"); + private final MutableComponent trainCanceled = CustomLanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".route_overview.stop_cancelled"); private final MutableComponent textShowDetails = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".saved_route_widget.show_details"); private final MutableComponent textRemove = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".route_widget.remove"); private final MutableComponent textShare = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".saved_route_widget.share"); diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/SavedRoutesViewer.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/SavedRoutesViewer.java index 7c20b4f3..fd023c77 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/SavedRoutesViewer.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/SavedRoutesViewer.java @@ -9,7 +9,7 @@ import de.mrjulsen.mcdragonlib.DragonLib; import de.mrjulsen.mcdragonlib.client.gui.widgets.DLAbstractScrollBar; import de.mrjulsen.mcdragonlib.client.gui.widgets.DLRenderable; -import de.mrjulsen.mcdragonlib.client.gui.widgets.ScrollableWidgetContainer; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLScrollableWidgetContainer; import de.mrjulsen.mcdragonlib.client.util.Graphics; import de.mrjulsen.mcdragonlib.client.util.GuiUtils; import de.mrjulsen.mcdragonlib.core.EAlignment; @@ -20,7 +20,7 @@ import net.minecraft.client.gui.screens.Screen; import net.minecraft.network.chat.Component; -public class SavedRoutesViewer extends ScrollableWidgetContainer { +public class SavedRoutesViewer extends DLScrollableWidgetContainer { private final Screen parent; private final DLAbstractScrollBar scrollBar; @@ -35,7 +35,7 @@ public SavedRoutesViewer(Screen parent, int x, int y, int width, int height, DLA scrollBar.setAutoScrollerSize(true); scrollBar.setScreenSize(height()); - scrollBar.updateMaxScroll(0); + scrollBar.setMaxScroll(0); scrollBar.withOnValueChanged((sb) -> setYScrollOffset(sb.getScrollValue())); scrollBar.setStepSize(10); } @@ -67,7 +67,7 @@ public void displayRoutes(List data) { if (lastData == null || lastData.dayOrderValue() != d.dayOrderValue()) { Component text; long worldTime = DragonLib.getCurrentWorldTime(); - long dayDiff = d.dayOrderValue() - (worldTime + DragonLib.DAYTIME_SHIFT) / DragonLib.TICKS_PER_DAY; + long dayDiff = d.dayOrderValue() - (worldTime + DragonLib.daytimeShift()) / DragonLib.ticksPerDay(); if (d.timeOrderValue() < worldTime) text = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".saved_routes.in_the_past"); else if (dayDiff == 0) text = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".saved_routes.today"); else if (dayDiff == 1) text = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".saved_routes.tomorrow"); @@ -83,7 +83,7 @@ public void displayRoutes(List data) { } contentHeight += 10; - scrollBar.updateMaxScroll(contentHeight); + scrollBar.setMaxScroll(contentHeight); } @Override diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/StationDeparturesViewer.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/StationDeparturesViewer.java index 14995f92..22febe15 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/StationDeparturesViewer.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/StationDeparturesViewer.java @@ -6,7 +6,7 @@ import de.mrjulsen.crn.registry.ModAccessorTypes.DepartureRoutesData; import de.mrjulsen.crn.data.navigation.ClientRoute; import de.mrjulsen.mcdragonlib.client.gui.widgets.DLAbstractScrollBar; -import de.mrjulsen.mcdragonlib.client.gui.widgets.ScrollableWidgetContainer; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLScrollableWidgetContainer; import de.mrjulsen.mcdragonlib.client.util.Graphics; import de.mrjulsen.mcdragonlib.client.util.GuiUtils; import de.mrjulsen.mcdragonlib.core.EAlignment; @@ -17,7 +17,7 @@ import net.minecraft.client.gui.narration.NarrationElementOutput; import net.minecraft.client.gui.screens.Screen; -public class StationDeparturesViewer extends ScrollableWidgetContainer { +public class StationDeparturesViewer extends DLScrollableWidgetContainer { private final Screen parent; private final DLAbstractScrollBar scrollBar; @@ -30,7 +30,7 @@ public StationDeparturesViewer(Screen parent, int x, int y, int width, int heigh scrollBar.setAutoScrollerSize(true); scrollBar.setScreenSize(height()); - scrollBar.updateMaxScroll(0); + scrollBar.setMaxScroll(0); scrollBar.withOnValueChanged((sb) -> setYScrollOffset(sb.getScrollValue())); scrollBar.setStepSize(10); } @@ -55,7 +55,7 @@ public void displayRoutes(String stationTagName, UserSettings settings) { contentHeight += (widget.height() + 3); } contentHeight += 7; - scrollBar.updateMaxScroll(contentHeight); + scrollBar.setMaxScroll(contentHeight); }); } diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/StationDeparturesWidget.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/StationDeparturesWidget.java index 2f3317cc..5cf74d01 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/StationDeparturesWidget.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/StationDeparturesWidget.java @@ -6,8 +6,8 @@ import de.mrjulsen.crn.CreateRailwaysNavigator; import de.mrjulsen.crn.client.gui.CreateDynamicWidgets; import de.mrjulsen.crn.client.gui.CreateDynamicWidgets.ColorShade; -import de.mrjulsen.crn.client.gui.screen.TrainJourneySreen; -import de.mrjulsen.crn.client.lang.ELanguage; +import de.mrjulsen.crn.client.gui.screen.TrainJourneyScreen; +import de.mrjulsen.crn.client.lang.CustomLanguage; import de.mrjulsen.crn.util.ModUtils; import de.mrjulsen.crn.data.navigation.ClientRoute; import de.mrjulsen.mcdragonlib.client.gui.DLScreen; @@ -34,15 +34,15 @@ public class StationDeparturesWidget extends DLButton implements AutoCloseable { public static final float DEFAULT_SCALE = 0.75f; - private final MutableComponent connectionInPast = ELanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".navigator.route_entry.connection_in_past"); - private final MutableComponent trainCanceled = ELanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".route_overview.stop_cancelled"); + private final MutableComponent connectionInPast = CustomLanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".navigator.route_entry.connection_in_past"); + private final MutableComponent trainCanceled = CustomLanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".route_overview.stop_cancelled"); private final ClientRoute route; private final boolean arrival; public StationDeparturesWidget(Screen parent, StationDeparturesViewer viewer, int x, int y, int width, ClientRoute route, boolean arrival) { super(x, y, width, 32, TextUtils.empty(), (b) -> { - DLScreen.setScreen(new TrainJourneySreen(parent, route, route.getStart().getTrainId())); + DLScreen.setScreen(new TrainJourneyScreen(parent, route, route.getStart().getTrainId())); }); this.route = route; this.arrival = arrival; diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/TrainDebugViewer.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/TrainDebugViewer.java index 94c138e0..4e605122 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/TrainDebugViewer.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/TrainDebugViewer.java @@ -4,7 +4,7 @@ import de.mrjulsen.crn.registry.ModAccessorTypes; import de.mrjulsen.crn.debug.TrainDebugData; import de.mrjulsen.mcdragonlib.client.gui.widgets.DLAbstractScrollBar; -import de.mrjulsen.mcdragonlib.client.gui.widgets.ScrollableWidgetContainer; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLScrollableWidgetContainer; import de.mrjulsen.mcdragonlib.client.util.Graphics; import de.mrjulsen.mcdragonlib.client.util.GuiUtils; import de.mrjulsen.mcdragonlib.core.EAlignment; @@ -13,7 +13,7 @@ import net.minecraft.client.gui.narration.NarrationElementOutput; import net.minecraft.client.gui.screens.Screen; -public class TrainDebugViewer extends ScrollableWidgetContainer { +public class TrainDebugViewer extends DLScrollableWidgetContainer { private final Screen parent; private final DLAbstractScrollBar scrollBar; @@ -26,7 +26,7 @@ public TrainDebugViewer(Screen parent, int x, int y, int width, int height, DLAb scrollBar.setAutoScrollerSize(true); scrollBar.setScreenSize(height()); - scrollBar.updateMaxScroll(0); + scrollBar.setMaxScroll(0); scrollBar.withOnValueChanged((sb) -> setYScrollOffset(sb.getScrollValue())); scrollBar.setStepSize(10); } @@ -35,11 +35,6 @@ public Screen getParent() { return parent; } - @Override - protected void clearWidgets() { - super.clearWidgets(); - } - public void reload() { clearWidgets(); contentHeight = 0; @@ -52,7 +47,7 @@ public void reload() { contentHeight += (widget.height() + 3); } contentHeight += 7; - scrollBar.updateMaxScroll(contentHeight); + scrollBar.setMaxScroll(contentHeight); }); } diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/create/CreateTimeSelectionWidget.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/create/CreateTimeSelectionWidget.java index 8e30a997..5d79b50d 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/create/CreateTimeSelectionWidget.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/create/CreateTimeSelectionWidget.java @@ -5,7 +5,7 @@ import de.mrjulsen.crn.CreateRailwaysNavigator; import de.mrjulsen.crn.client.gui.CreateDynamicWidgets; import de.mrjulsen.mcdragonlib.DragonLib; -import de.mrjulsen.mcdragonlib.client.gui.widgets.WidgetContainer; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLWidgetContainer; import de.mrjulsen.mcdragonlib.client.util.Graphics; import de.mrjulsen.mcdragonlib.client.util.GuiUtils; import de.mrjulsen.mcdragonlib.core.EAlignment; @@ -16,7 +16,7 @@ import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; -public class CreateTimeSelectionWidget extends WidgetContainer { +public class CreateTimeSelectionWidget extends DLWidgetContainer { public static final int WIDHT = 66; public static final int HEIGHT = 18; @@ -33,7 +33,7 @@ public CreateTimeSelectionWidget(int x, int y, int max) { transferTimeInput = addRenderableWidget(new ScrollInput(x() + 3, y(), width() - 6, height()) .withRange(0, max) - .withStepFunction(a -> a.shift ? 1000 : 500) + .withStepFunction(a -> a.shift ? (int)DragonLib.ticksPerIngameHour() : (int)(DragonLib.ticksPerIngameHour() / 2)) .titled(transferTimeBoxText.copy()) .calling((i) -> { if (transferTimeInput == null) return; diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/flyouts/FlyoutAdvancedSearchsettingsWidget.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/flyouts/FlyoutAdvancedSearchsettingsWidget.java index 4a1fe2a0..93f3fee3 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/flyouts/FlyoutAdvancedSearchsettingsWidget.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/flyouts/FlyoutAdvancedSearchsettingsWidget.java @@ -55,9 +55,4 @@ public void renderFlyoutContent(Graphics graphics, int mouseX, int mouseY, float super.renderFlyoutContent(graphics, mouseX, mouseY, partialTicks, contentArea); GuiUtils.drawString(graphics, font, contentArea.getX() + 8, contentArea.getY() + 8, textTrainGroups, DragonLib.NATIVE_BUTTON_FONT_COLOR_ACTIVE, EAlignment.LEFT, false); } - - @Override - public void close() { - super.close(); - } } diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/flyouts/FlyoutColorPicker.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/flyouts/FlyoutColorPicker.java index a544c841..dc9f6257 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/flyouts/FlyoutColorPicker.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/flyouts/FlyoutColorPicker.java @@ -2,7 +2,6 @@ import java.util.function.Consumer; -import de.mrjulsen.crn.Constants; import de.mrjulsen.crn.client.gui.CreateDynamicWidgets.ColorShade; import de.mrjulsen.crn.client.gui.widgets.AbstractFlyoutWidget; import de.mrjulsen.crn.client.gui.widgets.ColorPickerWidget; @@ -15,9 +14,9 @@ public class FlyoutColorPicker addRenderableWidgetFunc, Consumer removeWidgetFunc) { + public FlyoutColorPicker(DLScreen screen, int initialColor, int[] defaultColors, int colorsPerLine, boolean allowCustom, boolean allowNone, Consumer addRenderableWidgetFunc, Consumer removeWidgetFunc) { super(screen, 100, 50, FlyoutPointer.RIGHT, ColorShade.LIGHT, addRenderableWidgetFunc, removeWidgetFunc); - colorPicker = addRenderableWidget(new ColorPickerWidget(screen, x() + 10, y() + 10, Constants.DEFAULT_TRAIN_TYPE_COLORS, 5, initialColor, (picker) -> { + colorPicker = addRenderableWidget(new ColorPickerWidget(screen, x() + 10, y() + 10, defaultColors, colorsPerLine, initialColor, allowCustom, allowNone, (picker) -> { closeImmediately(); })); set_width(colorPicker.width() + 20); diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/flyouts/FlyoutDepartureInWidget.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/flyouts/FlyoutDepartureInWidget.java index efb50ddc..42c81832 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/flyouts/FlyoutDepartureInWidget.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/flyouts/FlyoutDepartureInWidget.java @@ -42,7 +42,7 @@ public FlyoutDepartureInWidget(DLScreen screen, FlyoutPointer pointer, ColorShad this.settings = settings; this.getUserSetting = getUserSetting; - this.timeSelection = addRenderableWidget(new CreateTimeSelectionWidget(getContentArea().getX() + 8, getContentArea().getY() + 24, DragonLib.TICKS_PER_DAY * 10)); + this.timeSelection = addRenderableWidget(new CreateTimeSelectionWidget(getContentArea().getX() + 8, getContentArea().getY() + 24, (int)Math.min(DragonLib.ticksPerDay() * 10, Integer.MAX_VALUE))); DLIconButton resetBtn = addRenderableWidget(new DLIconButton(ButtonType.DEFAULT, AreaStyle.FLAT, ModGuiIcons.REFRESH.getAsSprite(16, 16), getContentArea().getX() + getContentArea().getWidth() - DLIconButton.DEFAULT_BUTTON_WIDTH - 2, getContentArea().getY() + 2, TextUtils.empty(), (b) -> { getUserSetting.get().setToDefault(); timeSelection.setValue(getUserSetting.get().getValue()); diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/flyouts/FlyoutScrollInput.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/flyouts/FlyoutScrollInput.java new file mode 100644 index 00000000..b537ecaa --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/flyouts/FlyoutScrollInput.java @@ -0,0 +1,72 @@ +package de.mrjulsen.crn.client.gui.widgets.flyouts; + +import java.util.Locale; +import java.util.function.Consumer; +import de.mrjulsen.crn.client.gui.CreateDynamicWidgets.ColorShade; +import de.mrjulsen.crn.client.gui.widgets.AbstractFlyoutWidget; +import de.mrjulsen.crn.client.gui.widgets.CRNListBox; +import de.mrjulsen.crn.client.gui.widgets.DLCreateSelectionScrollInput; +import de.mrjulsen.crn.client.gui.widgets.FlatCheckBox; +import de.mrjulsen.crn.client.gui.widgets.ModernVerticalScrollBar; +import de.mrjulsen.mcdragonlib.DragonLib; +import de.mrjulsen.mcdragonlib.client.gui.DLScreen; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLEditBox; +import de.mrjulsen.mcdragonlib.client.gui.widgets.IDragonLibWidget; +import de.mrjulsen.mcdragonlib.client.util.GuiAreaDefinition; +import de.mrjulsen.mcdragonlib.util.DLUtils; +import de.mrjulsen.mcdragonlib.util.TextUtils; +import net.minecraft.client.gui.components.Widget; +import net.minecraft.client.gui.components.events.GuiEventListener; +import net.minecraft.client.gui.narration.NarratableEntry; +import net.minecraft.network.chat.Component; + +public class FlyoutScrollInput extends AbstractFlyoutWidget { + private final DLEditBox searchBox; + private final CRNListBox content; + private final DLCreateSelectionScrollInput input; + + public FlyoutScrollInput(DLScreen screen, FlyoutPointer pointer, ColorShade pointerShade, Consumer addRenderableWidgetFunc, Consumer removeWidgetFunc, DLCreateSelectionScrollInput input) { + super(screen, 1, 120, pointer, pointerShade, addRenderableWidgetFunc, removeWidgetFunc); + this.input = input; + set_width(input.width() + 10); + + searchBox = addRenderableWidget(new DLEditBox(font, getContentArea().getX() + 3, getContentArea().getY() + 3, getContentArea().getWidth() - 6, 16, TextUtils.empty())); + searchBox.withHint(DragonLib.TEXT_SEARCH); + searchBox.setResponder((text) -> reload(null)); + + final int searchBoxHeight = searchBox.x() + searchBox.height() - 1; + + ModernVerticalScrollBar scrollBar = new ModernVerticalScrollBar(screen, getContentArea().getX() + getContentArea().getWidth() - 7, searchBoxHeight + 2, getContentArea().getHeight() - searchBoxHeight + 1, GuiAreaDefinition.of(screen)); + this.content = addRenderableWidget(new CRNListBox<>(screen, getContentArea().getX() + 2, searchBoxHeight + 2, getContentArea().getWidth() - 4, getContentArea().getHeight() - searchBoxHeight + 1, scrollBar)); + + addRenderableWidget(scrollBar); + } + + @Override + public void open(IDragonLibWidget parent) { + reload(() -> super.open(parent)); + } + + private void reload(Runnable andThen) { + content.displayData(input.getOptions(), (c, i) -> { + if (!c.getString().toLowerCase(Locale.ROOT).contains(searchBox.getValue().toLowerCase(Locale.ROOT))) { + return null; + } + + return new FlatCheckBox(0, 0, 0, c.getString(), input.getState() == i, + (b) -> { + content.getEntries().forEach(x -> { + boolean checked = x.getKey() == b; + x.getKey().setChecked(checked, false); + }); + if (b.isChecked()) { + input.setState(i); + input.onChanged(); + closeImmediately(); + } + } + ); + }); + DLUtils.doIfNotNull(andThen, x -> x.run()); + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/flyouts/FlyoutTrainGroupsWidget.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/flyouts/FlyoutTrainGroupsWidget.java index b7ca3265..e7d12cb8 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/flyouts/FlyoutTrainGroupsWidget.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/flyouts/FlyoutTrainGroupsWidget.java @@ -78,7 +78,7 @@ public void open(IDragonLibWidget parent) { private void reload(Runnable andThen) { DataAccessor.getFromServer(null, ModAccessorTypes.GET_ALL_TRAIN_GROUPS, (groups) -> { - trainGroups.displayData(new ArrayList<>(groups.stream().sorted((a, b) -> a.getGroupName().compareToIgnoreCase(b.getGroupName())).toList()), (group) -> { + trainGroups.displayData(new ArrayList<>(groups.stream().sorted((a, b) -> a.getGroupName().compareToIgnoreCase(b.getGroupName())).toList()), (group, i) -> { FlatCheckBox cb = new FlatCheckBox(0, 0, 0, group.getGroupName(), getUserSetting.get().getValue().stream().noneMatch(x -> x.equals(group.getGroupName())), (b) -> {}); return cb; }); diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/flyouts/FlyoutTransferTimeWidget.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/flyouts/FlyoutTransferTimeWidget.java index 01f6eb44..b35e1a85 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/flyouts/FlyoutTransferTimeWidget.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/flyouts/FlyoutTransferTimeWidget.java @@ -42,7 +42,7 @@ public FlyoutTransferTimeWidget(DLScreen screen, FlyoutPointer pointer, ColorSha this.settings = settings; this.getUserSetting = getUserSetting; - this.timeSelection = addRenderableWidget(new CreateTimeSelectionWidget(getContentArea().getX() + 8, getContentArea().getY() + 24, DragonLib.TICKS_PER_DAY)); + this.timeSelection = addRenderableWidget(new CreateTimeSelectionWidget(getContentArea().getX() + 8, getContentArea().getY() + 24, (int)DragonLib.ticksPerDay())); DLIconButton resetBtn = addRenderableWidget(new DLIconButton(ButtonType.DEFAULT, AreaStyle.FLAT, ModGuiIcons.REFRESH.getAsSprite(16, 16), getContentArea().getX() + getContentArea().getWidth() - DLIconButton.DEFAULT_BUTTON_WIDTH - 2, getContentArea().getY() + 2, TextUtils.empty(), (b) -> { getUserSetting.get().setToDefault(); timeSelection.setValue(getUserSetting.get().getValue()); diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/modular/GuiBuilderContext.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/modular/GuiBuilderContext.java new file mode 100644 index 00000000..c2e451bd --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/modular/GuiBuilderContext.java @@ -0,0 +1,19 @@ +package de.mrjulsen.crn.client.gui.widgets.modular; + +public class GuiBuilderContext { + private final ModularWidgetBuilder builder; + private final ModularWidgetContainer container; + + public GuiBuilderContext(ModularWidgetBuilder builder, ModularWidgetContainer container) { + this.builder = builder; + this.container = container; + } + + public ModularWidgetBuilder builder() { + return builder; + } + + public ModularWidgetContainer container() { + return container; + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/modular/ModularWidgetBuilder.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/modular/ModularWidgetBuilder.java new file mode 100644 index 00000000..e639290e --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/modular/ModularWidgetBuilder.java @@ -0,0 +1,63 @@ +package de.mrjulsen.crn.client.gui.widgets.modular; + +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.function.Consumer; + +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLAbstractScrollBar; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +@Environment(EnvType.CLIENT) +public class ModularWidgetBuilder { + + private final ModularWidgetContainer container; + private final Map> lineBuilders = new LinkedHashMap<>(); + + public ModularWidgetBuilder(ModularWidgetContainer container) { + this.container = container; + } + + public void addLine(String name, Consumer lineBuilder) { + if (lineBuilders.containsKey(name)) { + return; + } + lineBuilders.put(name, lineBuilder); + } + + public int getCurrentLinesCount() { + return lineBuilders.size(); + } + + public boolean hasLine(String name) { + return lineBuilders.containsKey(name); + } + + public Consumer getLine(String name) { + return lineBuilders.get(name); + } + + public void addToLine(String name, Consumer additional) { + lineBuilders.replace(name, lineBuilders.get(name).andThen(additional)); + } + + public void build() { + int currentY = 0; + for (Consumer c : lineBuilders.values()) { + ModularWidgetLine line = new ModularWidgetLine(0, 0, container.width()); + line.set_width(container.width() - container.getPaddingLeft() - container.getPaddingRight()); + c.accept(line); + currentY += container.addLine(line, currentY); + } + + DLAbstractScrollBar scrollBar = container.getScrollbar(); + scrollBar.set_x(container.x() + container.width() - scrollBar.width()); + scrollBar.set_y(container.y()); + scrollBar.set_height(container.height()); + scrollBar.setAutoScrollerSize(true); + scrollBar.setScreenSize(container.height()); + scrollBar.setMaxScroll(currentY + container.getPaddingBottom()); + scrollBar.withOnValueChanged((sb) -> container.setYScrollOffset(sb.getScrollValue())); + scrollBar.setStepSize(10); + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/modular/ModularWidgetContainer.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/modular/ModularWidgetContainer.java new file mode 100644 index 00000000..579f0393 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/modular/ModularWidgetContainer.java @@ -0,0 +1,112 @@ +package de.mrjulsen.crn.client.gui.widgets.modular; + +import java.util.function.BiConsumer; + +import de.mrjulsen.mcdragonlib.client.gui.DLScreen; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLAbstractScrollBar; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLScrollableWidgetContainer; +import de.mrjulsen.mcdragonlib.client.util.Graphics; +import de.mrjulsen.mcdragonlib.client.util.GuiUtils; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.gui.narration.NarrationElementOutput; + +@Environment(EnvType.CLIENT) +public class ModularWidgetContainer extends DLScrollableWidgetContainer { + + public static final int DEFAULT_PADDING = 10; + + private final DLScreen screen; + private final DLAbstractScrollBar scrollBar; + private final BiConsumer builder; + + private int paddingLeft; + private int paddingRight; + private int paddingTop; + private int paddingBottom; + + public ModularWidgetContainer(DLScreen screen, int x, int y, int width, int height, BiConsumer builder, DLAbstractScrollBar scrollBar) { + this(screen, x, y, width, height, builder, scrollBar, DEFAULT_PADDING, DEFAULT_PADDING, DEFAULT_PADDING, DEFAULT_PADDING); + } + + public ModularWidgetContainer(DLScreen screen, int x, int y, int width, int height, BiConsumer builder, DLAbstractScrollBar scrollBar, int paddingLeft, int paddingRight, int paddingTop, int paddingBottom) { + super(x, y, width, height); + this.screen = screen; + this.scrollBar = scrollBar; + this.builder = builder; + this.paddingLeft = paddingLeft; + this.paddingRight = paddingRight; + this.paddingTop = paddingTop; + this.paddingBottom = paddingBottom; + build(); + } + + public void build() { + clearWidgets(); + ModularWidgetBuilder mb = new ModularWidgetBuilder(this); + builder.accept(this, mb); + mb.build(); + } + + int addLine(ModularWidgetLine line, int yOffset) { + line.set_x(x() + paddingLeft); + line.set_y(y() + paddingTop + yOffset); + line.set_width(width() - paddingLeft - paddingRight); + addRenderableWidget(line); + return line.height(); + } + + public DLScreen getParentScreen() { + return screen; + } + + public DLAbstractScrollBar getScrollbar() { + return scrollBar; + } + + public int getPaddingLeft() { + return paddingLeft; + } + + public int getPaddingRight() { + return paddingRight; + } + + public int getPaddingTop() { + return paddingTop; + } + + public int getPaddingBottom() { + return paddingBottom; + } + + @Override + public void renderMainLayer(Graphics graphics, int mouseX, int mouseY, float partialTicks) { + super.renderMainLayer(graphics, mouseX, mouseY, partialTicks); + if (scrollBar.getScrollValue() > 0) { + GuiUtils.fillGradient(graphics, x(), y(), 0, width(), 10, 0x77000000, 0x00000000); + } + if (scrollBar.getScrollValue() < scrollBar.getMaxScroll()) { + GuiUtils.fillGradient(graphics, x(), y() + height() - 10, 0, width(), 10, 0x00000000, 0x77000000); + } + } + + @Override + public void set_width(int w) { + throw new IllegalStateException("Changing the width is not supported."); + } + + @Override + public NarrationPriority narrationPriority() { + return NarrationPriority.HOVERED; + } + + @Override + public void updateNarration(NarrationElementOutput narrationElementOutput) { } + + @Override + public boolean consumeScrolling(double mouseX, double mouseY) { + return false; + } + +} diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/modular/ModularWidgetLine.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/modular/ModularWidgetLine.java new file mode 100644 index 00000000..c84a20aa --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/modular/ModularWidgetLine.java @@ -0,0 +1,67 @@ +package de.mrjulsen.crn.client.gui.widgets.modular; + +import java.util.ArrayList; +import java.util.Collection; + +import com.simibubi.create.foundation.gui.widget.ScrollInput; + +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLRenderable; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLWidgetContainer; +import net.minecraft.client.gui.components.AbstractWidget; +import net.minecraft.client.gui.narration.NarrationElementOutput; + +public class ModularWidgetLine extends DLWidgetContainer { + + protected static final int HEIGHT = 22; + + private int currentX = 0; + private Collection scrollInputs = new ArrayList<>(); + + public ModularWidgetLine(int x, int y, int width) { + super(x, y, width, HEIGHT); + } + + public int getCurrentX() { + return currentX; + } + + public int getRemainingWidth() { + return width() - currentX; + } + + public T add(T w) { + currentX += w.x - currentX + w.getWidth(); + if (w instanceof ScrollInput i) { + scrollInputs.add(i); + } + return this.addRenderableWidget(w); + } + + public T add(T w) { + currentX += w.x() - currentX + w.width(); + return this.addRenderableOnly(w); + } + + @Override + public void tick() { + super.tick(); + for (ScrollInput i : scrollInputs) { + i.tick(); + } + } + + + @Override + public NarrationPriority narrationPriority() { + return NarrationPriority.HOVERED; + } + + @Override + public void updateNarration(NarrationElementOutput narrationElementOutput) {} + + @Override + public boolean consumeScrolling(double mouseX, double mouseY) { + return false; + } + +} diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/options/AbstractDataListEntry.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/options/AbstractDataListEntry.java index 82c18591..c302d402 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/options/AbstractDataListEntry.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/options/AbstractDataListEntry.java @@ -12,8 +12,8 @@ import de.mrjulsen.mcdragonlib.client.gui.widgets.DLButton; import de.mrjulsen.mcdragonlib.client.gui.widgets.DLIconButton; import de.mrjulsen.mcdragonlib.client.gui.widgets.DLTooltip; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLWidgetContainer; import de.mrjulsen.mcdragonlib.client.gui.widgets.IDragonLibWidget; -import de.mrjulsen.mcdragonlib.client.gui.widgets.WidgetContainer; import de.mrjulsen.mcdragonlib.client.gui.widgets.DLAbstractImageButton.ButtonType; import de.mrjulsen.mcdragonlib.client.render.Sprite; import de.mrjulsen.mcdragonlib.client.render.DynamicGuiRenderer.AreaStyle; @@ -26,7 +26,7 @@ import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; -public abstract class AbstractDataListEntry> extends WidgetContainer { +public abstract class AbstractDataListEntry> extends DLWidgetContainer { protected final DataListContainer parent; diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/options/DLOptionsList.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/options/DLOptionsList.java index 26075911..f02cb819 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/options/DLOptionsList.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/options/DLOptionsList.java @@ -6,9 +6,9 @@ import de.mrjulsen.crn.CreateRailwaysNavigator; import de.mrjulsen.mcdragonlib.DragonLib; import de.mrjulsen.mcdragonlib.client.gui.widgets.DLAbstractScrollBar; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLScrollableWidgetContainer; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLWidgetContainer; import de.mrjulsen.mcdragonlib.client.gui.widgets.IDragonLibWidget; -import de.mrjulsen.mcdragonlib.client.gui.widgets.ScrollableWidgetContainer; -import de.mrjulsen.mcdragonlib.client.gui.widgets.WidgetContainer; import de.mrjulsen.mcdragonlib.client.util.Graphics; import de.mrjulsen.mcdragonlib.client.util.GuiUtils; import de.mrjulsen.mcdragonlib.core.EAlignment; @@ -20,7 +20,7 @@ import net.minecraft.client.gui.screens.Screen; import net.minecraft.network.chat.Component; -public class DLOptionsList extends ScrollableWidgetContainer { +public class DLOptionsList extends DLScrollableWidgetContainer { private final DLAbstractScrollBar scrollBar; private int contentHeight = 0; @@ -34,7 +34,7 @@ public DLOptionsList(Screen parent, int x, int y, int width, int height, DLAbstr scrollBar.setAutoScrollerSize(true); scrollBar.setScreenSize(height()); - scrollBar.updateMaxScroll(0); + scrollBar.setMaxScroll(0); scrollBar.withOnValueChanged((sb) -> setYScrollOffset(sb.getScrollValue())); scrollBar.setStepSize(10); } @@ -48,7 +48,7 @@ public int getContentWidth() { return width() - 20; } - public OptionEntry addOption(Function, T> contentContainer, Component text, Component description, BiConsumer, OptionEntryHeader> onHeaderClick, Function onTitleEdited) { + public OptionEntry addOption(Function, T> contentContainer, Component text, Component description, BiConsumer, OptionEntryHeader> onHeaderClick, Function onTitleEdited) { OptionEntry entry = new OptionEntry(parent, this, 0, y(), width() - 20, contentContainer, text, description, x -> rearrangeContent(), onHeaderClick, onTitleEdited); addRenderableWidget(entry); return entry; @@ -83,7 +83,7 @@ public void rearrangeContent() { } } contentHeight += 10; - scrollBar.updateMaxScroll(contentHeight); + scrollBar.setMaxScroll(contentHeight); if (!scrollBar.canScroll()) { scrollBar.scrollTo(0); } diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/options/DataListContainer.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/options/DataListContainer.java index 42e4e0e5..93e0818f 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/options/DataListContainer.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/options/DataListContainer.java @@ -17,7 +17,7 @@ import de.mrjulsen.mcdragonlib.DragonLib; import de.mrjulsen.mcdragonlib.client.gui.widgets.DLEditBox; import de.mrjulsen.mcdragonlib.client.gui.widgets.DLTooltip; -import de.mrjulsen.mcdragonlib.client.gui.widgets.WidgetContainer; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLWidgetContainer; import de.mrjulsen.mcdragonlib.client.util.Graphics; import de.mrjulsen.mcdragonlib.client.util.GuiUtils; import de.mrjulsen.mcdragonlib.data.Single.MutableSingle; @@ -26,7 +26,7 @@ import net.minecraft.client.gui.narration.NarrationElementOutput; import net.minecraft.client.gui.screens.Screen; -public class DataListContainer extends WidgetContainer { +public class DataListContainer extends DLWidgetContainer { private static final int BORDER_WIDTH = 2; diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/options/NewEntryWidget.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/options/NewEntryWidget.java index 8412ca17..22caa76d 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/options/NewEntryWidget.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/options/NewEntryWidget.java @@ -13,7 +13,7 @@ import de.mrjulsen.mcdragonlib.client.gui.widgets.DLAbstractImageButton.ButtonType; import de.mrjulsen.mcdragonlib.client.gui.widgets.DLEditBox; import de.mrjulsen.mcdragonlib.client.gui.widgets.DLIconButton; -import de.mrjulsen.mcdragonlib.client.gui.widgets.WidgetContainer; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLWidgetContainer; import de.mrjulsen.mcdragonlib.client.render.DynamicGuiRenderer.AreaStyle; import de.mrjulsen.mcdragonlib.client.util.DLWidgetsCollection; import de.mrjulsen.mcdragonlib.client.util.Graphics; @@ -27,7 +27,7 @@ import net.minecraft.client.gui.screens.Screen; import net.minecraft.network.chat.MutableComponent; -public class NewEntryWidget extends WidgetContainer { +public class NewEntryWidget extends DLWidgetContainer { private final DLEditBox nameBox; private final DLIconButton addBtn; diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/options/OptionEntry.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/options/OptionEntry.java index 8af99032..81260067 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/options/OptionEntry.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/options/OptionEntry.java @@ -18,7 +18,7 @@ import de.mrjulsen.mcdragonlib.client.gui.widgets.DLEditBox; import de.mrjulsen.mcdragonlib.client.gui.widgets.DLIconButton; import de.mrjulsen.mcdragonlib.client.gui.widgets.DLTooltip; -import de.mrjulsen.mcdragonlib.client.gui.widgets.WidgetContainer; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLWidgetContainer; import de.mrjulsen.mcdragonlib.client.gui.widgets.DLAbstractImageButton.ButtonType; import de.mrjulsen.mcdragonlib.client.render.Sprite; import de.mrjulsen.mcdragonlib.client.render.DynamicGuiRenderer.AreaStyle; @@ -33,7 +33,7 @@ import net.minecraft.network.chat.FormattedText; import net.minecraft.network.chat.Style; -public class OptionEntry extends WidgetContainer { +public class OptionEntry extends DLWidgetContainer { public static void expandOrCollapse(OptionEntry entry) { if (entry.isExpanded()) diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/routedetails/RouteDetailsTransferWidget.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/routedetails/RouteDetailsTransferWidget.java index f9fb08a7..aac3c089 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/routedetails/RouteDetailsTransferWidget.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/routedetails/RouteDetailsTransferWidget.java @@ -2,7 +2,7 @@ import de.mrjulsen.crn.CreateRailwaysNavigator; import de.mrjulsen.crn.client.gui.ModGuiIcons; -import de.mrjulsen.crn.client.lang.ELanguage; +import de.mrjulsen.crn.client.lang.CustomLanguage; import de.mrjulsen.crn.data.navigation.TransferConnection; import de.mrjulsen.mcdragonlib.client.gui.widgets.DLRenderable; import de.mrjulsen.mcdragonlib.client.util.Graphics; @@ -17,15 +17,15 @@ public class RouteDetailsTransferWidget extends DLRenderable { - private final MutableComponent transferText = ELanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".route_details.transfer"); + private final MutableComponent transferText = CustomLanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".route_details.transfer"); protected static final ResourceLocation GUI = new ResourceLocation(CreateRailwaysNavigator.MOD_ID, "textures/gui/widgets.png"); protected static final int GUI_TEXTURE_WIDTH = 256; protected static final int GUI_TEXTURE_HEIGHT = 256; protected static final int ENTRY_WIDTH = 225; - private final MutableComponent textConnectionEndangered = ELanguage.translate("gui.createrailwaysnavigator.route_overview.connection_endangered").withStyle(ChatFormatting.GOLD).withStyle(ChatFormatting.BOLD); - private final MutableComponent textConnectionMissed = ELanguage.translate("gui.createrailwaysnavigator.route_overview.connection_missed").withStyle(ChatFormatting.RED).withStyle(ChatFormatting.BOLD); + private final MutableComponent textConnectionEndangered = CustomLanguage.translate("gui.createrailwaysnavigator.route_overview.connection_endangered").withStyle(ChatFormatting.GOLD).withStyle(ChatFormatting.BOLD); + private final MutableComponent textConnectionMissed = CustomLanguage.translate("gui.createrailwaysnavigator.route_overview.connection_missed").withStyle(ChatFormatting.RED).withStyle(ChatFormatting.BOLD); private final TransferConnection connection; diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/routedetails/RoutePartEntryWidget.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/routedetails/RoutePartEntryWidget.java index 14117750..e2ffd613 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/routedetails/RoutePartEntryWidget.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/routedetails/RoutePartEntryWidget.java @@ -74,19 +74,19 @@ protected void renderData(Graphics graphics, int y) { if (this.type == TrainStopType.TRANSIT) { graphics.poseStack().translate((x() + 28) / scale, (y + 2) / scale, 0); - GuiUtils.drawString(graphics, font, 00, 00, TextUtils.text(TimeUtils.parseTime(stop.getScheduledArrivalTime() + DragonLib.DAYTIME_SHIFT, ModClientConfig.TIME_FORMAT.get())).withStyle(valid ? ChatFormatting.RESET : ChatFormatting.STRIKETHROUGH), valid ? 0xFFFFFFFF : Constants.COLOR_DELAYED, EAlignment.LEFT, false); - GuiUtils.drawString(graphics, font, 00, 12, TextUtils.text(TimeUtils.parseTime(stop.getScheduledDepartureTime() + DragonLib.DAYTIME_SHIFT, ModClientConfig.TIME_FORMAT.get())).withStyle(valid ? ChatFormatting.RESET : ChatFormatting.STRIKETHROUGH), valid ? 0xFFFFFFFF : Constants.COLOR_DELAYED, EAlignment.LEFT, false); + GuiUtils.drawString(graphics, font, 00, 00, TextUtils.text(TimeUtils.parseTime(stop.getScheduledArrivalTime() + DragonLib.daytimeShift(), ModClientConfig.TIME_FORMAT.get())).withStyle(valid ? ChatFormatting.RESET : ChatFormatting.STRIKETHROUGH), valid ? 0xFFFFFFFF : Constants.COLOR_DELAYED, EAlignment.LEFT, false); + GuiUtils.drawString(graphics, font, 00, 12, TextUtils.text(TimeUtils.parseTime(stop.getScheduledDepartureTime() + DragonLib.daytimeShift(), ModClientConfig.TIME_FORMAT.get())).withStyle(valid ? ChatFormatting.RESET : ChatFormatting.STRIKETHROUGH), valid ? 0xFFFFFFFF : Constants.COLOR_DELAYED, EAlignment.LEFT, false); if (stop.shouldRenderRealTime() && !part.isCancelled() && valid) { - GuiUtils.drawString(graphics, font, 30, 00, TimeUtils.parseTime(stop.getScheduledArrivalTime() + (stop.getArrivalTimeDeviation() / precision * precision) + DragonLib.DAYTIME_SHIFT, ModClientConfig.TIME_FORMAT.get()), stop.isArrivalDelayed() ? Constants.COLOR_DELAYED : Constants.COLOR_ON_TIME, EAlignment.LEFT, false); - GuiUtils.drawString(graphics, font, 30, 12, TimeUtils.parseTime(stop.getScheduledDepartureTime() + (stop.getDepartureTimeDeviation() / precision * precision) + DragonLib.DAYTIME_SHIFT, ModClientConfig.TIME_FORMAT.get()), stop.isDepartureDelayed() ? Constants.COLOR_DELAYED : Constants.COLOR_ON_TIME, EAlignment.LEFT, false); + GuiUtils.drawString(graphics, font, 30, 00, TimeUtils.parseTime(stop.getScheduledArrivalTime() + (stop.getArrivalTimeDeviation() / precision * precision) + DragonLib.daytimeShift(), ModClientConfig.TIME_FORMAT.get()), stop.isArrivalDelayed() ? Constants.COLOR_DELAYED : Constants.COLOR_ON_TIME, EAlignment.LEFT, false); + GuiUtils.drawString(graphics, font, 30, 12, TimeUtils.parseTime(stop.getScheduledDepartureTime() + (stop.getDepartureTimeDeviation() / precision * precision) + DragonLib.daytimeShift(), ModClientConfig.TIME_FORMAT.get()), stop.isDepartureDelayed() ? Constants.COLOR_DELAYED : Constants.COLOR_ON_TIME, EAlignment.LEFT, false); } } else { graphics.poseStack().translate((x() + 28) / scale, (y + 6) / scale, 0); - GuiUtils.drawString(graphics, font, 00, 00, TextUtils.text(TimeUtils.parseTime((type == TrainStopType.START ? stop.getScheduledDepartureTime() : stop.getScheduledArrivalTime()) + DragonLib.DAYTIME_SHIFT, ModClientConfig.TIME_FORMAT.get())).withStyle(valid ? ChatFormatting.RESET : ChatFormatting.STRIKETHROUGH), valid ? 0xFFFFFFFF : Constants.COLOR_DELAYED, EAlignment.LEFT, false); + GuiUtils.drawString(graphics, font, 00, 00, TextUtils.text(TimeUtils.parseTime((type == TrainStopType.START ? stop.getScheduledDepartureTime() : stop.getScheduledArrivalTime()) + DragonLib.daytimeShift(), ModClientConfig.TIME_FORMAT.get())).withStyle(valid ? ChatFormatting.RESET : ChatFormatting.STRIKETHROUGH), valid ? 0xFFFFFFFF : Constants.COLOR_DELAYED, EAlignment.LEFT, false); if (stop.shouldRenderRealTime() && !part.isCancelled() && valid) { long realTime = type == TrainStopType.START ? stop.getScheduledDepartureTime() + (stop.getDepartureTimeDeviation() / precision * precision) : stop.getScheduledArrivalTime() + (stop.getArrivalTimeDeviation() / precision * precision); - GuiUtils.drawString(graphics, font, 30, 00, TimeUtils.parseTime(realTime + DragonLib.DAYTIME_SHIFT, ModClientConfig.TIME_FORMAT.get()), (type == TrainStopType.START ? stop.isDepartureDelayed() : stop.isArrivalDelayed()) ? Constants.COLOR_DELAYED : Constants.COLOR_ON_TIME, EAlignment.LEFT, false); + GuiUtils.drawString(graphics, font, 30, 00, TimeUtils.parseTime(realTime + DragonLib.daytimeShift(), ModClientConfig.TIME_FORMAT.get()), (type == TrainStopType.START ? stop.isDepartureDelayed() : stop.isArrivalDelayed()) ? Constants.COLOR_DELAYED : Constants.COLOR_ON_TIME, EAlignment.LEFT, false); } } diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/routedetails/RoutePartTrainDetailsWidget.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/routedetails/RoutePartTrainDetailsWidget.java index 40b6c797..d0c5cf84 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/routedetails/RoutePartTrainDetailsWidget.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/routedetails/RoutePartTrainDetailsWidget.java @@ -9,7 +9,7 @@ import de.mrjulsen.crn.CreateRailwaysNavigator; import de.mrjulsen.crn.client.ClientWrapper; import de.mrjulsen.crn.client.gui.CreateDynamicWidgets; -import de.mrjulsen.crn.client.gui.screen.TrainJourneySreen; +import de.mrjulsen.crn.client.gui.screen.TrainJourneyScreen; import de.mrjulsen.crn.client.gui.widgets.routedetails.RoutePartWidget.RoutePartDetailsActionBuilder; import de.mrjulsen.crn.data.train.ClientTrainStop; import de.mrjulsen.crn.data.train.TrainStatus.CompiledTrainStatus; @@ -20,7 +20,7 @@ import de.mrjulsen.mcdragonlib.DragonLib; import de.mrjulsen.mcdragonlib.client.gui.widgets.DLAbstractImageButton.ButtonType; import de.mrjulsen.mcdragonlib.client.gui.widgets.DLIconButton; -import de.mrjulsen.mcdragonlib.client.gui.widgets.WidgetContainer; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLWidgetContainer; import de.mrjulsen.mcdragonlib.client.render.DynamicGuiRenderer.AreaStyle; import de.mrjulsen.mcdragonlib.client.render.GuiIcons; import de.mrjulsen.mcdragonlib.client.render.Sprite; @@ -37,7 +37,7 @@ import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; -public class RoutePartTrainDetailsWidget extends WidgetContainer implements Closeable { +public class RoutePartTrainDetailsWidget extends DLWidgetContainer implements Closeable { protected static final ResourceLocation GUI = new ResourceLocation(CreateRailwaysNavigator.MOD_ID, "textures/gui/widgets.png"); protected static final int GUI_TEXTURE_WIDTH = 256; @@ -77,7 +77,7 @@ public RoutePartTrainDetailsWidget(Screen parent, RoutePartWidget container, Cli currentHeight = DEFAULT_HEIGHT; updateStatus(); - addAction(new RoutePartDetailsActionBuilder(TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".journey_info.title"), Sprite.empty(), (b) -> Minecraft.getInstance().setScreen(new TrainJourneySreen(parent, route, part.getTrainId())))); + addAction(new RoutePartDetailsActionBuilder(TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".journey_info.title"), Sprite.empty(), (b) -> Minecraft.getInstance().setScreen(new TrainJourneyScreen(parent, route, part.getTrainId())))); CRNEventsManager.getEventOptional(RouteDetailsActionsEvent.class).ifPresent(x -> x.run(route, part, container.isExpanded()).forEach(this::addAction)); if (!part.getStopovers().isEmpty()) { addAction(new RoutePartDetailsActionBuilder(container.isExpanded() ? Constants.TOOLTIP_COLLAPSE : Constants.TOOLTIP_EXPAND, (container.isExpanded() ? GuiIcons.ARROW_UP : GuiIcons.ARROW_DOWN).getAsSprite(16, 16), (b) -> container.setExpanded(!container.isExpanded()))); @@ -126,7 +126,7 @@ protected void renderData(Graphics graphics, int y) { graphics.poseStack().scale(scale, scale, scale); Component trainName = TextUtils.text(part.getLastStop().getTrainDisplayName()).withStyle(ChatFormatting.BOLD); CreateDynamicWidgets.renderTextHighlighted(graphics, (int)((x() + 80 + 24) / scale), (int)((y + 4) / scale), font, trainName, part.getLastStop().getTrainDisplayColor()); - GuiUtils.drawString(graphics, font, (int)((x() + 80 + 24) / scale) + font.width(trainName) + 10, (int)((y + 6) / scale), GuiUtils.ellipsisString(font, TextUtils.text(String.format("%s (%s)", stop.getTrainName(), stop.getTrainId().toString().split("-")[0])), (int)((maxWidth - font.width(trainName) - 15) / scale)), 0xFFDBDBDB, EAlignment.LEFT, false); + GuiUtils.drawString(graphics, font, (int)((x() + 80 + 24) / scale) + font.width(trainName) + 10, (int)((y + 6) / scale), GuiUtils.ellipsisString(font, TextUtils.text(String.format("%s (%s)", stop.getTrainDisplayName(), stop.getTrainId().toString().split("-")[0])), (int)((maxWidth - font.width(trainName) - 15) / scale)), 0xFFDBDBDB, EAlignment.LEFT, false); GuiUtils.drawString(graphics, font, (int)((x() + 80 + 24) / scale), (int)((y + 18) / scale), GuiUtils.ellipsisString(font, TextUtils.text(stop.getDisplayTitle()), (int)((maxWidth - 24) / scale)), 0xFFDBDBDB, EAlignment.LEFT, false); graphics.poseStack().scale(mul, mul, mul); graphics.poseStack().popPose(); @@ -174,7 +174,6 @@ public int getDy() { @Override public void close() { - part.stopListeningAll(this); } @Override diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/routedetails/RoutePartWidget.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/routedetails/RoutePartWidget.java index 5daab598..35a4cf98 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/routedetails/RoutePartWidget.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/routedetails/RoutePartWidget.java @@ -1,7 +1,5 @@ package de.mrjulsen.crn.client.gui.widgets.routedetails; -import java.io.Closeable; -import java.io.IOException; import java.util.List; import java.util.function.Consumer; @@ -10,8 +8,8 @@ import de.mrjulsen.crn.data.navigation.ClientRoute; import de.mrjulsen.crn.data.navigation.ClientRoutePart; import de.mrjulsen.mcdragonlib.client.gui.widgets.DLIconButton; +import de.mrjulsen.mcdragonlib.client.gui.widgets.DLWidgetContainer; import de.mrjulsen.mcdragonlib.client.gui.widgets.IDragonLibWidget; -import de.mrjulsen.mcdragonlib.client.gui.widgets.WidgetContainer; import de.mrjulsen.mcdragonlib.client.render.Sprite; import de.mrjulsen.mcdragonlib.client.util.DLWidgetsCollection; import de.mrjulsen.mcdragonlib.client.util.Graphics; @@ -22,7 +20,7 @@ import net.minecraft.client.gui.screens.Screen; import net.minecraft.network.chat.Component; -public class RoutePartWidget extends WidgetContainer { +public class RoutePartWidget extends DLWidgetContainer { private final ClientRoutePart part; private final ClientRoute route; @@ -49,11 +47,6 @@ public RoutePartWidget(Screen parent, int x, int y, int width, ClientRoute route } public void initGui() { - children().stream().filter(x -> x instanceof Closeable).forEach(x -> { - try { - ((Closeable)x).close(); - } catch (IOException e) {} - }); clearWidgets(); stackLayoutY = 0; stationWidgets.clear(); diff --git a/common/src/main/java/de/mrjulsen/crn/client/lang/ELanguage.java b/common/src/main/java/de/mrjulsen/crn/client/lang/CustomLanguage.java similarity index 83% rename from common/src/main/java/de/mrjulsen/crn/client/lang/ELanguage.java rename to common/src/main/java/de/mrjulsen/crn/client/lang/CustomLanguage.java index 3bc57dab..23a5f343 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/lang/ELanguage.java +++ b/common/src/main/java/de/mrjulsen/crn/client/lang/CustomLanguage.java @@ -7,7 +7,7 @@ import net.minecraft.network.chat.MutableComponent; import net.minecraft.util.StringRepresentable; -public enum ELanguage implements StringRepresentable { +public enum CustomLanguage implements StringRepresentable { DEFAULT("defaut", "def"), ENGLISH("english", "en_us"), GERMAN("german", "de_de"), @@ -21,13 +21,17 @@ public enum ELanguage implements StringRepresentable { FRENCH("french", "fr_fr"), KOREAN("korean", "ko_kr"), SWEDISH("swedish", "sv_se"), - PORTUGUESE("portuguese", "pt_pt"); + PORTUGUESE("portuguese", "pt_pt"), + BASQUE("basque", "eu_es"), + ITALIAN("italian", "it_it"), + JAPANESE("japanese", "ja_jp"), + PORTUGUESE_brazilian("portuguese_brazilian", "pt_br"), + UKRAINIAN("ukrainian", "uk_ua"); private String name; private String code; - - private ELanguage(String name, String code) { + private CustomLanguage(String name, String code) { this.name = name; this.code = code; } @@ -40,7 +44,7 @@ public String getCode() { return code; } - public static ELanguage getByCode(String code) { + public static CustomLanguage getByCode(String code) { return Arrays.stream(values()).filter(x -> x.getCode().equals(code)).findFirst().orElse(DEFAULT); } diff --git a/common/src/main/java/de/mrjulsen/crn/cmd/DebugCommand.java b/common/src/main/java/de/mrjulsen/crn/cmd/DebugCommand.java index dffbc443..3e7e4022 100644 --- a/common/src/main/java/de/mrjulsen/crn/cmd/DebugCommand.java +++ b/common/src/main/java/de/mrjulsen/crn/cmd/DebugCommand.java @@ -9,6 +9,8 @@ import de.mrjulsen.crn.registry.ModAccessorTypes; import de.mrjulsen.mcdragonlib.util.TextUtils; import de.mrjulsen.mcdragonlib.util.accessor.DataAccessor; +import dev.architectury.platform.Platform; +import dev.architectury.utils.Env; import net.minecraft.Util; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; @@ -87,9 +89,14 @@ private static int reset(CommandSourceStack cmd) throws CommandSyntaxException { } private static int showTrainObservationOverlay(CommandSourceStack cmd) throws CommandSyntaxException { - cmd.sendSuccess(TextUtils.text("Visibility of the train debug overlay has been toggled."), false); - DebugOverlay.toggle(); - return 1; + if (Platform.getEnvironment() == Env.CLIENT) { + cmd.sendSuccess(TextUtils.text("Visibility of the train debug overlay has been toggled."), false); + DebugOverlay.toggle(); + return 1; + } else { + cmd.sendFailure(TextUtils.text("Cannot open the train debug overlay in multiplayer.")); + } + return 0; } private static int showTrainDebugScreen(CommandSourceStack cmd) throws CommandSyntaxException { diff --git a/common/src/main/java/de/mrjulsen/crn/config/ModClientConfig.java b/common/src/main/java/de/mrjulsen/crn/config/ModClientConfig.java index d347c20e..a6ca273b 100644 --- a/common/src/main/java/de/mrjulsen/crn/config/ModClientConfig.java +++ b/common/src/main/java/de/mrjulsen/crn/config/ModClientConfig.java @@ -1,7 +1,7 @@ package de.mrjulsen.crn.config; import de.mrjulsen.crn.client.gui.overlay.OverlayPosition; -import de.mrjulsen.crn.client.lang.ELanguage; +import de.mrjulsen.crn.client.lang.CustomLanguage; import de.mrjulsen.crn.util.ESpeedUnit; import de.mrjulsen.mcdragonlib.util.TimeUtils.TimeFormat; import net.minecraftforge.common.ForgeConfigSpec; @@ -18,7 +18,7 @@ public class ModClientConfig { public static final ForgeConfigSpec.ConfigValue ROUTE_NOTIFICATIONS; public static final ForgeConfigSpec.ConfigValue ROUTE_OVERLAY_POSITION; public static final ForgeConfigSpec.ConfigValue TIME_FORMAT; - public static final ForgeConfigSpec.ConfigValue LANGUAGE; + public static final ForgeConfigSpec.ConfigValue LANGUAGE; public static final ForgeConfigSpec.ConfigValue SPEED_UNIT; public static final double MIN_SCALE = 0.25f; @@ -42,7 +42,7 @@ public class ModClientConfig { .defineEnum("route_overlay.position", OverlayPosition.TOP_LEFT); LANGUAGE = BUILDER.comment("The language that should be used for announcements of the navigator. Can be different from the game's language settings. (Default: Default)") - .defineEnum("language", ELanguage.DEFAULT); + .defineEnum("language", CustomLanguage.DEFAULT); SPEED_UNIT = BUILDER.comment("The unit to be used to represent speed. (Default: KMH)") .defineEnum("speed_unit", ESpeedUnit.KMH); TIME_FORMAT = BUILDER.comment("Display Time Format. (Default: Hours 24)") diff --git a/common/src/main/java/de/mrjulsen/crn/config/ModCommonConfig.java b/common/src/main/java/de/mrjulsen/crn/config/ModCommonConfig.java index 150ae845..1df957cc 100644 --- a/common/src/main/java/de/mrjulsen/crn/config/ModCommonConfig.java +++ b/common/src/main/java/de/mrjulsen/crn/config/ModCommonConfig.java @@ -14,7 +14,9 @@ public class ModCommonConfig { public static final ForgeConfigSpec.ConfigValue TRANSFER_COST; public static final ForgeConfigSpec.ConfigValue TOTAL_DURATION_DEVIATION_THRESHOLD; public static final ForgeConfigSpec.ConfigValue CUSTOM_TRANSIT_TIME_CALCULATION; + public static final ForgeConfigSpec.ConfigValue USE_CREATE_TRANSIT_TIMES_ON_INIT; public static final ForgeConfigSpec.ConfigValue EXCLUDE_TRAINS; + public static final ForgeConfigSpec.ConfigValue ADVANCED_LOGGING; static { BUILDER.push(CreateRailwaysNavigator.MOD_ID + "_common_config"); @@ -32,6 +34,8 @@ public class ModCommonConfig { CUSTOM_TRANSIT_TIME_CALCULATION = BUILDER.comment("When activated, CRN calculates the transit times of the trains and does not use the calculations from Create. CRN is much more accurate, while Create calculates an average. (Default: ON)") .define("train_data_calculation.custom_transit_time_calculation", true); + USE_CREATE_TRANSIT_TIMES_ON_INIT = BUILDER.comment("When activated, CRN uses the transit times provided by Create (if available) when initializing. When turned off, the initialization may take longer. (Default: ON)") + .define("train_data_calculation.use_create_transit_times_on_init", true); TOTAL_DURATION_BUFFER_SIZE = BUILDER.comment(new String[] {"[in Cycles]", "How often the calculated time for a route section between two stations must deviate from the current reference value before the reference value is updated. (Default: 3)"}) .defineInRange("train_data_calculation.total_duration_deviation_buffer_size", 3, 1, 16); TOTAL_DURATION_DEVIATION_THRESHOLD = BUILDER.comment(new String[] {"[in Ticks]", "Deviations of the calculated time for a route section between two stations from the reference value that are smaller than the threshold value are not taken into account. (Default: 50)"}) @@ -41,6 +45,9 @@ public class ModCommonConfig { AUTO_RESET_TIMINGS = BUILDER.comment(new String[] {"[In Cycles]", "(ONLY WORKS FOR TRAINS WITH DYNAMIC DELAYS! Trains without dynamic delays do this every new schedule section by default.)", " ", "Every X cycles the scheduled times are updated to the current real-time data. (Default: 2; Disabled: 0)"}) .defineInRange("train_data_calculation.auto_reset_timings", 2, 0, Integer.MAX_VALUE); + ADVANCED_LOGGING = BUILDER.comment(new String[] {"Prints more details to the console to better observe the behavior of CRN. Only relevant for debugging."}) + .define("debug.advanced_logging", false); + BUILDER.pop(); SPEC = BUILDER.build(); } diff --git a/common/src/main/java/de/mrjulsen/crn/data/ISaveableNavigatorData.java b/common/src/main/java/de/mrjulsen/crn/data/ISaveableNavigatorData.java index 781efc63..9a486d82 100644 --- a/common/src/main/java/de/mrjulsen/crn/data/ISaveableNavigatorData.java +++ b/common/src/main/java/de/mrjulsen/crn/data/ISaveableNavigatorData.java @@ -17,7 +17,7 @@ public interface ISaveableNavigatorData { /** The value (usually the time at which the corresponding entry is relevant) by which the items are sorted and grouped. */ long timeOrderValue(); default long dayOrderValue() { - return (timeOrderValue() + DragonLib.DAYTIME_SHIFT) / DragonLib.TICKS_PER_DAY; + return (timeOrderValue() + DragonLib.daytimeShift()) / DragonLib.ticksPerDay(); } /** Custom value used for grouping with custom label. Default: {@code null} (grouped by time) */ default Pair customGroup() { diff --git a/common/src/main/java/de/mrjulsen/crn/data/StationTag.java b/common/src/main/java/de/mrjulsen/crn/data/StationTag.java index 40afc206..d88b963b 100644 --- a/common/src/main/java/de/mrjulsen/crn/data/StationTag.java +++ b/common/src/main/java/de/mrjulsen/crn/data/StationTag.java @@ -191,7 +191,12 @@ public void addAll(Map stations) { */ public boolean contains(String stationName) { String regex = stationName.isBlank() ? stationName : "\\Q" + stationName.replace("*", "\\E.*\\Q"); - return stations.keySet().stream().anyMatch(x -> x.matches(regex)); + for (String name : stations.keySet()) { + if (name.matches(regex)) { + return true; + } + } + return false; } public Set getAllStationNames() { @@ -226,7 +231,17 @@ public String toString() { @Override public boolean equals(Object obj) { if (obj instanceof StationTag alias) { - return getTagName().equals(alias.getTagName()) && getAllStationNames().size() == alias.getAllStationNames().size() && getAllStationNames().stream().allMatch(x -> alias.contains(x)); + if (!getTagName().equals(alias.getTagName())) return false; + Set stationNames = getAllStationNames(); + Set otherStationNames = alias.getAllStationNames(); + if (stationNames.size() != otherStationNames.size()) return false; + + for (String name : stationNames) { + if (!otherStationNames.contains(name)) { + return false; + } + } + return true; } return false; } diff --git a/common/src/main/java/de/mrjulsen/crn/data/TrainInfo.java b/common/src/main/java/de/mrjulsen/crn/data/TrainInfo.java index 2e07e66b..62dec251 100644 --- a/common/src/main/java/de/mrjulsen/crn/data/TrainInfo.java +++ b/common/src/main/java/de/mrjulsen/crn/data/TrainInfo.java @@ -1,8 +1,10 @@ package de.mrjulsen.crn.data; +import javax.annotation.Nullable; + import net.minecraft.nbt.CompoundTag; -public record TrainInfo(TrainLine line, TrainGroup group) { +public record TrainInfo(@Nullable TrainLine line, @Nullable TrainGroup group) { private static final String NBT_TRAIN_GROUP = "Group"; private static final String NBT_TRAIN_LINE = "Line"; diff --git a/common/src/main/java/de/mrjulsen/crn/data/UserSettings.java b/common/src/main/java/de/mrjulsen/crn/data/UserSettings.java index e4a8a550..a8e346a3 100644 --- a/common/src/main/java/de/mrjulsen/crn/data/UserSettings.java +++ b/common/src/main/java/de/mrjulsen/crn/data/UserSettings.java @@ -15,6 +15,7 @@ import java.util.stream.Collectors; import de.mrjulsen.crn.CreateRailwaysNavigator; +import de.mrjulsen.crn.config.ModCommonConfig; import de.mrjulsen.crn.data.storage.GlobalSettings; import de.mrjulsen.crn.event.ModCommonEvents; import de.mrjulsen.crn.exceptions.RuntimeSideException; @@ -136,7 +137,7 @@ public final synchronized void save() throws RuntimeSideException { CompoundTag nbt = this.toNbt(); try { NbtIo.writeCompressed(nbt, new File(ModCommonEvents.getCurrentServer().get().getWorldPath(new LevelResource("data/" + FILENAME + getOwnerId() + ".nbt")).toString())); - CreateRailwaysNavigator.LOGGER.info("Saved user settings."); + if (ModCommonConfig.ADVANCED_LOGGING.get()) CreateRailwaysNavigator.LOGGER.info("Saved user settings."); } catch (IOException e) { CreateRailwaysNavigator.LOGGER.error("Unable to save user settings.", e); } diff --git a/common/src/main/java/de/mrjulsen/crn/data/navigation/ClientRoute.java b/common/src/main/java/de/mrjulsen/crn/data/navigation/ClientRoute.java index 4feba82a..7918695a 100644 --- a/common/src/main/java/de/mrjulsen/crn/data/navigation/ClientRoute.java +++ b/common/src/main/java/de/mrjulsen/crn/data/navigation/ClientRoute.java @@ -1,6 +1,5 @@ package de.mrjulsen.crn.data.navigation; -import java.util.Collection; import java.util.HashMap; import java.util.IdentityHashMap; import java.util.List; @@ -14,7 +13,8 @@ import de.mrjulsen.crn.CreateRailwaysNavigator; import de.mrjulsen.crn.client.ClientWrapper; -import de.mrjulsen.crn.client.lang.ELanguage; +import de.mrjulsen.crn.client.lang.CustomLanguage; +import de.mrjulsen.crn.config.ModCommonConfig; import de.mrjulsen.crn.data.SavedRoutesManager; import de.mrjulsen.crn.data.train.ClientTrainStop; import de.mrjulsen.crn.data.train.RoutePartProgressState; @@ -143,7 +143,6 @@ public static record QueuedAnnouncementEvent(Runnable callback, ClientRoutePart private static final String keyNotificationConnectionCanceled = "gui.createrailwaysnavigator.route_overview.journey_interrupted"; private final Map>> listeners = new HashMap<>(); - private final Map> queuedNotifications = new HashMap<>(); private final long id = System.nanoTime(); private final Map listenerIds = new HashMap<>(); @@ -181,8 +180,10 @@ public ClientRoute(List parts, boolean realTimeTracker) { super(parts, realTimeTracker); this.currentPart = getFirstClientPart(); + if (ModCommonConfig.ADVANCED_LOGGING.get()) CreateRailwaysNavigator.LOGGER.info("Created new " + this); + if (!realTimeTracker) return; - getClientParts().stream().forEach(x -> listenerIds.put(ClientTrainListener.register(x.getSessionId(), x.getTrainId(), x::update), x)); + getClientParts().forEach(x -> listenerIds.put(ClientTrainListener.register(x.getSessionId(), x.getTrainId(), x::update), x)); CRNEventsManager.getEvent(DefaultTrainDataRefreshEvent.class).register(CreateRailwaysNavigator.MOD_ID + "_" + id, this::update); addListener(); @@ -231,10 +232,10 @@ public ClientRoute(List parts, boolean realTimeTracker) { if (currentPartIndex > 0) return; sendNotification( - ELanguage.translate(keyNotificationJourneyBeginsTitle, getEnd().getClientTag().tagName()), + CustomLanguage.translate(keyNotificationJourneyBeginsTitle, getEnd().getClientTag().tagName()), getStart().getRealTimeStationTag().info().isPlatformKnown() ? - ELanguage.translate(keyNotificationJourneyBeginsWithPlatform, getStart().getTrainDisplayName(), getStart().getDisplayTitle(), ModUtils.formatTime(getStart().getScheduledDepartureTime(), false), getStart().getRealTimeStationTag().info().platform()) : - ELanguage.translate(keyNotificationJourneyBegins, getStart().getTrainDisplayName(), getStart().getDisplayTitle(), ModUtils.formatTime(getStart().getScheduledDepartureTime(), false)) + CustomLanguage.translate(keyNotificationJourneyBeginsWithPlatform, getStart().getTrainDisplayName(), getStart().getDisplayTitle(), ModUtils.formatTime(getStart().getScheduledDepartureTime(), false), getStart().getRealTimeStationTag().info().platform()) : + CustomLanguage.translate(keyNotificationJourneyBegins, getStart().getTrainDisplayName(), getStart().getDisplayTitle(), ModUtils.formatTime(getStart().getScheduledDepartureTime(), false)) ); queuedAnnouncements.add(new QueuedAnnouncementEvent(() -> { @@ -331,14 +332,14 @@ public ClientRoute(List parts, boolean realTimeTracker) { part.listen(ClientRoutePart.EVENT_SCHEDULE_CHANGED, this, x -> { if (scheduleChangedSent) return; - sendNotification(ELanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".route_overview.notification.schedule_changed.title"), ELanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".route_overview.notification.schedule_changed")); + sendNotification(CustomLanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".route_overview.notification.schedule_changed.title"), CustomLanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".route_overview.notification.schedule_changed")); notifyListeners(EVENT_SCHEDULE_CHANGED, new ListenerNotificationData(this, x.part(), x.trainStop(), null)); scheduleChangedSent = true; }); part.listen(ClientRoutePart.EVENT_TRAIN_CANCELLED, this, x -> { if (cancelledSent) return; - sendNotification(ELanguage.translate(keyNotificationConnectionCanceledTitle), ELanguage.translate(keyNotificationConnectionCanceled, x.part().getFirstStop().getTrainDisplayName())); + sendNotification(CustomLanguage.translate(keyNotificationConnectionCanceledTitle), CustomLanguage.translate(keyNotificationConnectionCanceled, x.part().getFirstStop().getTrainDisplayName())); notifyListeners(EVENT_ANY_TRAIN_CANCELLED, new ListenerNotificationData(this, x.part(), x.trainStop(), null)); cancelledSent = true; }); @@ -400,7 +401,7 @@ public ClientRoute(List parts, boolean realTimeTracker) { getLastClientPart().listen(ClientRoutePart.EVENT_DEPARTURE_FROM_LAST_STOP, this, x -> { if (currentPartIndex < parts.size() - 1) return; this.progressState = RouteProgressState.AFTER; - sendNotification(ELanguage.translate(keyNotificationJourneyCompletedTitle), ELanguage.translate(keyNotificationJourneyCompleted)); + sendNotification(CustomLanguage.translate(keyNotificationJourneyCompletedTitle), CustomLanguage.translate(keyNotificationJourneyCompleted)); if (!savedRouteRemoved) { savedRouteRemoved = true; SavedRoutesManager.removeRoute(this); @@ -461,7 +462,7 @@ public ClientRoute(List parts, boolean realTimeTracker) { listen(EVENT_ANY_STATION_CHANGED, this, (p) -> { if (stationChangedSent) return; - sendNotification(ELanguage.translate(keyNotificationPlatformChangedTitle), ELanguage.translate(keyNotificationPlatformChanged, + sendNotification(CustomLanguage.translate(keyNotificationPlatformChangedTitle), CustomLanguage.translate(keyNotificationPlatformChanged, p.trainStop().getTrainDisplayName(), p.trainStop().getRealTimeStationTag().info().platform() )); @@ -475,11 +476,11 @@ public ClientRoute(List parts, boolean realTimeTracker) { }); listen(EVENT_ANNOUNCE_TRANSFER_ARRIVAL_STATION, this, (p) -> { - sendNotification(ELanguage.translate(keyNotificationTransferTitle), getStart().getRealTimeStationTag().info().isPlatformKnown() ? ELanguage.translate(keyNotificationTransferWithPlatform, + sendNotification(CustomLanguage.translate(keyNotificationTransferTitle), getStart().getRealTimeStationTag().info().isPlatformKnown() ? CustomLanguage.translate(keyNotificationTransferWithPlatform, p.connection().getDepartureStation().getTrainDisplayName(), p.connection().getDepartureStation().getDisplayTitle(), p.connection().getDepartureStation().getRealTimeStationTag().info().platform() - ) : ELanguage.translate(keyNotificationTransfer, + ) : CustomLanguage.translate(keyNotificationTransfer, p.connection().getDepartureStation().getTrainDisplayName(), p.connection().getDepartureStation().getDisplayTitle() ) @@ -496,8 +497,8 @@ private void sendNotification(Component title, Component description) { private void queueDelayNotification(ClientTrainStop stop, boolean start) { if (shouldShowNotifications()) { ClientWrapper.sendCRNNotification( - ELanguage.translate(keyNotificationTrainDelayedTitle, stop.getTrainDisplayName(), TimeUtils.parseDurationShort((int)(start ? stop.getDepartureTimeDeviation() : stop.getArrivalTimeDeviation()))), - ELanguage.translate(keyNotificationTrainDelayed, + CustomLanguage.translate(keyNotificationTrainDelayedTitle, stop.getTrainDisplayName(), TimeUtils.parseDurationShort((int)(start ? stop.getDepartureTimeDeviation() : stop.getArrivalTimeDeviation()))), + CustomLanguage.translate(keyNotificationTrainDelayed, ModUtils.formatTime(start ? stop.getRoundedRealTimeDepartureTime() : stop.getRoundedRealTimeArrivalTime(), false), ModUtils.formatTime(start ? stop.getScheduledDepartureTime() : stop.getScheduledArrivalTime(), false), stop.getClientTag().tagName() @@ -507,13 +508,13 @@ private void queueDelayNotification(ClientTrainStop stop, boolean start) { private void queueConnectionEndangeredNotification(TransferConnection connection) { if (shouldShowNotifications()) { - ClientWrapper.sendCRNNotification(ELanguage.translate(keyNotificationConnectionEndangeredTitle), ELanguage.translate(keyNotificationConnectionEndangered, connection.getDepartureStation().getTrainDisplayName(), connection.getDepartureStation().getDisplayTitle())); + ClientWrapper.sendCRNNotification(CustomLanguage.translate(keyNotificationConnectionEndangeredTitle), CustomLanguage.translate(keyNotificationConnectionEndangered, connection.getDepartureStation().getTrainDisplayName(), connection.getDepartureStation().getDisplayTitle())); } } private void queueConnectionMissedNotification(TransferConnection connection) { if (shouldShowNotifications()) { - ClientWrapper.sendCRNNotification(ELanguage.translate(keyNotificationConnectionMissedTitle), ELanguage.translate(keyNotificationConnectionMissed, connection.getDepartureStation().getTrainDisplayName(), connection.getDepartureStation().getDisplayTitle())); + ClientWrapper.sendCRNNotification(CustomLanguage.translate(keyNotificationConnectionMissedTitle), CustomLanguage.translate(keyNotificationConnectionMissed, connection.getDepartureStation().getTrainDisplayName(), connection.getDepartureStation().getDisplayTitle())); } } @@ -599,15 +600,10 @@ public void update() { } } - getConnections().stream().forEach(x -> x.update()); + for (TransferConnection connection : getConnections()) { + connection.update(); + } - // process notifications - queuedNotifications.entrySet().forEach(x -> { - if (x.getValue().isEmpty()) { - return; - } - }); - queuedNotifications.clear(); isCancelled.clear(); resetSpamBlockers(); } @@ -633,20 +629,32 @@ public void close() { public void closeAll() { listenersCount = 0; - listenerIds.entrySet().stream().forEach(x -> ClientTrainListener.unregister(x.getValue().getTrainId(), x.getKey())); - getClientParts().stream().forEach(x -> { - x.stopListeningAll(this); - x.close(); - }); - getConnections().stream().forEach(x -> { - x.stopListeningAll(this); - x.close(); - }); + synchronized (listenerIds) { + for (Map.Entry e : listenerIds.entrySet()) { + ClientTrainListener.unregister(e.getValue().getTrainId(), e.getKey()); + } + } + List clientParts = getClientParts(); + synchronized (clientParts) { + for (ClientRoutePart part : clientParts) { + part.stopListeningAll(this); + part.close(); + } + } + List connections = getConnections(); + synchronized (connections) { + for (TransferConnection connection : connections) { + connection.stopListeningAll(this); + connection.close(); + } + } stopListeningAll(this); CRNEventsManager.getEvent(DefaultTrainDataRefreshEvent.class).unregister(CreateRailwaysNavigator.MOD_ID + "_" + id); clearEvents(); isClosed = true; CreateRailwaysNavigator.LOGGER.info("Route listener closed."); + if (ModCommonConfig.ADVANCED_LOGGING.get()) CreateRailwaysNavigator.LOGGER.info("Closed " + this); + } public static ClientRoute fromNbt(CompoundTag nbt, boolean realTimeTracker) { @@ -661,12 +669,6 @@ public long timeOrderValue() { return getStart().getScheduledDepartureTime(); } - private static enum NotificationType { - DELAY, - CONNECTION_ENDANGERED, - CONNECTION_MISSED - } - public boolean isClosed() { return isClosed; } diff --git a/common/src/main/java/de/mrjulsen/crn/data/navigation/ClientRoutePart.java b/common/src/main/java/de/mrjulsen/crn/data/navigation/ClientRoutePart.java index ec2d8296..5b928a50 100644 --- a/common/src/main/java/de/mrjulsen/crn/data/navigation/ClientRoutePart.java +++ b/common/src/main/java/de/mrjulsen/crn/data/navigation/ClientRoutePart.java @@ -24,14 +24,16 @@ import de.mrjulsen.mcdragonlib.data.Single.MutableSingle; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; +import net.minecraft.nbt.StringTag; import net.minecraft.nbt.Tag; +import net.minecraft.resources.ResourceLocation; public class ClientRoutePart extends RoutePart implements ITrainListenerClient, IListenable { public static record ListenerNotificationData(ClientRoutePart part, ClientTrainStop trainStop) {} public static record QueuedAnnouncementEvent(Runnable callback, ClientTrainStop trainStop) {} - public static final String EVENT_UPDATE = "update"; + public static final String EVENT_UPDATE = "update2"; public static final String EVENT_ANNOUNCE_START = "announce_start"; public static final String EVENT_ARRIVAL_AT_START = "arrival_at_start"; public static final String EVENT_DEPARTURE_FROM_START = "departure_at_start"; @@ -155,7 +157,9 @@ public ClientRoutePart(UUID sessionId, UUID trainId, List routeStops, notifyListeners(EVENT_LAST_STOP_STATION_CHANGED, new ListenerNotificationData(this, x)); }); - getAllClientStops().stream().forEach(x -> { + + + getAllClientStops().forEach(x -> { x.listen(ClientTrainStop.EVENT_SCHEDULE_CHANGED, this, a -> { notifyListeners(EVENT_SCHEDULE_CHANGED, new ListenerNotificationData(this, a)); }); @@ -223,19 +227,25 @@ public void update(TrainRealTimeData data) { MutableSingle shouldRenderStatus = new MutableSingle<>(false); - getAllClientStops().stream().forEach(x -> { - if (data.stationData().containsKey(x.getScheduleIndex())) { - x.update(data.stationData().get(x.getScheduleIndex())); - if (x.shouldRenderRealTime()) { - shouldRenderStatus.setFirst(true); + List allStops = getAllClientStops(); + synchronized (allStops) { + for (ClientTrainStop stop : allStops) { + if (data.stationData().containsKey(stop.getScheduleIndex())) { + stop.update(data.stationData().get(stop.getScheduleIndex())); + if (stop.shouldRenderRealTime()) { + shouldRenderStatus.setFirst(true); + } } } - }); - getAllJourneyClientStops().stream().forEach(x -> { - if (data.stationData().containsKey(x.getScheduleIndex())) { - x.update(data.stationData().get(x.getScheduleIndex())); + } + List allJourneyStops = getAllJourneyClientStops(); + synchronized (allJourneyStops) { + for (ClientTrainStop stop : allJourneyStops) { + if (data.stationData().containsKey(stop.getScheduleIndex())) { + stop.update(data.stationData().get(stop.getScheduleIndex())); + } } - }); + } if (shouldRenderStatus.getFirst() || data.cancelled()) { status.addAll(data.statusInfo()); @@ -279,30 +289,62 @@ public static RoutePart fromNbt(CompoundTag nbt) { @Override public void close() { - getAllClientStops().stream().forEach(x -> { - x.stopListeningAll(this); - x.close(); - }); - getAllJourneyClientStops().stream().forEach(x -> { - x.stopListeningAll(this); - x.close(); - }); + List allStops = getAllClientStops(); + synchronized (allStops) { + for (ClientTrainStop stop : allStops) { + stop.stopListeningAll(this); + stop.close(); + } + } + List allJourneyStops = getAllJourneyClientStops(); + synchronized (allJourneyStops) { + for (ClientTrainStop stop : allJourneyStops) { + stop.stopListeningAll(this); + stop.close(); + } + } stopListeningAll(this); - } + CreateRailwaysNavigator.LOGGER.info("CLOSED " + this); + } - public static record TrainRealTimeData(UUID sessionId, Map stationData, Set statusInfo, boolean cancelled) { + public static class TrainRealTimeData { + private static final String NBT_SESSION_ID = "SessionId"; private static final String NBT_STATUS_INFOS = "Status"; private static final String NBT_CANCELLED = "Cancelled"; + private final UUID sessionId; + private final Map stationData; + private final Set statusLocations; + private final Set status; + private final boolean cancelled; + + private TrainRealTimeData(UUID sessionId, Map stationData, Set statusLocations, Set status, boolean cancelled) { + this.sessionId = sessionId; + this.stationData = stationData; + this.statusLocations = statusLocations; + this.status = status; + this.cancelled = cancelled; + } + + public static TrainRealTimeData createServer(UUID sessionId, Map stationData, Set statusLocations, boolean cancelled) { + return new TrainRealTimeData(sessionId, stationData, statusLocations, null, cancelled); + } + + private static TrainRealTimeData createClient(UUID sessionId, Map stationData, Set status, boolean cancelled) { + return new TrainRealTimeData(sessionId, stationData, null, status, cancelled); + } + public CompoundTag toNbt() { CompoundTag nbt = new CompoundTag(); nbt.putUUID(NBT_SESSION_ID, sessionId); - ListTag status = new ListTag(); - status.addAll(statusInfo().stream().map(x -> x.toNbt()).toList()); - nbt.put(NBT_STATUS_INFOS, status); + ListTag statusList = new ListTag(); + for (ResourceLocation s : statusLocations) { + statusList.add(StringTag.valueOf(s.toString())); + } + nbt.put(NBT_STATUS_INFOS, statusList); nbt.putBoolean(NBT_CANCELLED, cancelled); for (Map.Entry e : stationData.entrySet()) { @@ -312,12 +354,28 @@ public CompoundTag toNbt() { } public static TrainRealTimeData fromNbt(CompoundTag nbt) { - return new TrainRealTimeData( + return createClient( nbt.getUUID(NBT_SESSION_ID), nbt.getAllKeys().stream().filter(x -> { try { Integer.parseInt(x); return true; } catch (Exception e) { return false; } }).collect(Collectors.toMap(x -> Integer.parseInt(x), x -> TrainStopRealTimeData.fromNbt(nbt.getCompound(x)))), - nbt.getList(NBT_STATUS_INFOS, Tag.TAG_COMPOUND).stream().map(x -> CompiledTrainStatus.fromNbt((CompoundTag)x)).collect(Collectors.toSet()), + nbt.getList(NBT_STATUS_INFOS, Tag.TAG_STRING).stream().map(x -> CompiledTrainStatus.load(new ResourceLocation(((StringTag)x).getAsString()))).collect(Collectors.toSet()), nbt.getBoolean(NBT_CANCELLED) ); } + + public UUID sessionId() { + return sessionId; + } + + public Map stationData() { + return stationData; + } + + public Set statusInfo() { + return status; + } + + public boolean cancelled() { + return cancelled; + } } } diff --git a/common/src/main/java/de/mrjulsen/crn/data/navigation/ClientTrainListener.java b/common/src/main/java/de/mrjulsen/crn/data/navigation/ClientTrainListener.java index 7f291924..85743311 100644 --- a/common/src/main/java/de/mrjulsen/crn/data/navigation/ClientTrainListener.java +++ b/common/src/main/java/de/mrjulsen/crn/data/navigation/ClientTrainListener.java @@ -1,11 +1,12 @@ package de.mrjulsen.crn.data.navigation; -import java.util.ArrayList; +import java.util.Iterator; import java.util.Map; import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; import java.util.function.Consumer; +import de.mrjulsen.crn.data.navigation.ClientRoutePart.TrainRealTimeData; import de.mrjulsen.crn.registry.ModAccessorTypes; import de.mrjulsen.mcdragonlib.data.Pair; import de.mrjulsen.mcdragonlib.util.DLUtils; @@ -45,20 +46,24 @@ public static void unregister(UUID trainId, UUID callbackId) { } public static void tick(Runnable andThen) { - callbacks.entrySet().stream().forEach(x -> { - if (x.getValue().isEmpty()) { - callbacks.remove(x.getKey()); - return; - } - - final Map>> listeners = x.getValue(); - DataAccessor.getFromServer(x.getKey(), ModAccessorTypes.UPDATE_REALTIME, res -> { - if (res != null) { - new ArrayList<>(listeners.values()).stream().forEach(a -> a.getSecond().accept(res)); + synchronized (callbacks) { + Iterator>>>> iterator = callbacks.entrySet().iterator(); + while (iterator.hasNext()) { + Map.Entry>>> entry = iterator.next(); + if (entry.getValue().isEmpty()) { + iterator.remove(); + continue; } - DLUtils.doIfNotNull(andThen, a -> a.run()); - }); - }); + + final Map>> listeners = entry.getValue(); + DataAccessor.getFromServer(entry.getKey(), ModAccessorTypes.UPDATE_REALTIME, res -> { + if (res != null) { + listeners.values().forEach(a -> a.getSecond().accept(res)); + } + DLUtils.doIfNotNull(andThen, a -> a.run()); + }); + } + } } public static void clear() { diff --git a/common/src/main/java/de/mrjulsen/crn/data/navigation/NavigatableGraph.java b/common/src/main/java/de/mrjulsen/crn/data/navigation/NavigatableGraph.java index 9320b6bf..8497f60d 100644 --- a/common/src/main/java/de/mrjulsen/crn/data/navigation/NavigatableGraph.java +++ b/common/src/main/java/de/mrjulsen/crn/data/navigation/NavigatableGraph.java @@ -138,7 +138,7 @@ protected void addTrain(Train train, TrainData data) { protected boolean isPredictionAllowed(TrainPrediction prediction) { TrainTravelSection section = prediction.getSection(); boolean usable = section.isUsable() || (section.isFirstStop(prediction) && section.previousSection().isUsable() && section.previousSection().shouldIncludeNextStationOfNextSection()); - return !globalSettings().isStationBlacklisted(prediction.getStationName()) && (prediction.getSection().getTrainGroup() == null || !userSettings.navigationExcludedTrainGroups.getValue().contains(prediction.getSection().getTrainGroup().getGroupName())) && usable; + return !globalSettings().isStationBlacklisted(prediction.getStationName()) && (prediction.getSection().getTrainGroup().map(x -> !userSettings.navigationExcludedTrainGroups.getValue().contains(x.getGroupName())).orElse(true)) && usable; } protected Node addNode(TrainPrediction prediction) { diff --git a/common/src/main/java/de/mrjulsen/crn/data/navigation/Node.java b/common/src/main/java/de/mrjulsen/crn/data/navigation/Node.java index 759ad40c..dc130b78 100644 --- a/common/src/main/java/de/mrjulsen/crn/data/navigation/Node.java +++ b/common/src/main/java/de/mrjulsen/crn/data/navigation/Node.java @@ -79,9 +79,12 @@ public void setPreviousNode(Node previousNode) { public void setNextNode(Node nextNode) { this.nextNode = nextNode; - nextNode.getConnections().stream().filter(x -> x.target() == this).forEach(x -> { - nextConnections.add(new EdgeConnection(nextNode, x.edge().invert())); - }); + for (EdgeConnection connection : nextNode.getConnections()) { + if (connection.target() != this) { + continue; + } + nextConnections.add(new EdgeConnection(nextNode, connection.edge().invert())); + } } public Node getNextNode() { diff --git a/common/src/main/java/de/mrjulsen/crn/data/navigation/Route.java b/common/src/main/java/de/mrjulsen/crn/data/navigation/Route.java index 678e4d62..2896330e 100644 --- a/common/src/main/java/de/mrjulsen/crn/data/navigation/Route.java +++ b/common/src/main/java/de/mrjulsen/crn/data/navigation/Route.java @@ -42,7 +42,12 @@ public List getConnections() { } public Optional getConnectionWith(TrainStop stop) { - return getConnections().stream().filter(x -> x.getArrivalStation() == stop || x.getDepartureStation() == stop).findFirst(); + for (TransferConnection connection : getConnections()) { + if (connection.getArrivalStation() == stop || connection.getDepartureStation() == stop) { + return Optional.ofNullable(connection); + } + } + return Optional.empty(); } public RoutePart getFirstPart() { @@ -109,7 +114,9 @@ public String toString() { public CompoundTag toNbt() { CompoundTag nbt = new CompoundTag(); ListTag list = new ListTag(); - list.addAll(parts.stream().map(x -> x.toNbt()).toList()); + for (RoutePart part : parts) { + list.add(part.toNbt()); + } nbt.put(NBT_PARTS, list); return nbt; } @@ -126,7 +133,7 @@ public List getOverviewData() { List lines = new ArrayList<>(); lines.add(new SaveableNavigatorDataLine(TextUtils.text(ModUtils.formatTime(getStart().getScheduledDepartureTime(), false) + " " + getStart().getClientTag().tagName()), ModGuiIcons.ROUTE_START.getAsSprite(ModGuiIcons.ICON_SIZE, ModGuiIcons.ICON_SIZE))); lines.add(new SaveableNavigatorDataLine(TextUtils.text(ModUtils.formatTime(getEnd().getScheduledArrivalTime(), false) + " " + getEnd().getClientTag().tagName()), ModGuiIcons.ROUTE_END.getAsSprite(ModGuiIcons.ICON_SIZE, ModGuiIcons.ICON_SIZE))); - lines.add(new SaveableNavigatorDataLine(TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".route_overview.date", (getStart().getScheduledDepartureTime() + DragonLib.DAYTIME_SHIFT) / DragonLib.TICKS_PER_DAY, ModUtils.formatTime(getStart().getScheduledDepartureTime(), false)).append(" | ").append(TimeUtils.parseDurationShort(departureIn())), ModGuiIcons.CALENDAR.getAsSprite(ModGuiIcons.ICON_SIZE, ModGuiIcons.ICON_SIZE))); + lines.add(new SaveableNavigatorDataLine(TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".route_overview.date", (getStart().getScheduledDepartureTime() + DragonLib.daytimeShift()) / DragonLib.ticksPerDay(), ModUtils.formatTime(getStart().getScheduledDepartureTime(), false)).append(" | ").append(TimeUtils.parseDurationShort(departureIn())), ModGuiIcons.CALENDAR.getAsSprite(ModGuiIcons.ICON_SIZE, ModGuiIcons.ICON_SIZE))); lines.add(new SaveableNavigatorDataLine(TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".route_overview.transfers", getTransferCount()).append(TextUtils.text(" | " + TimeUtils.parseDurationShort(travelTime()))), ModGuiIcons.INFO.getAsSprite(ModGuiIcons.ICON_SIZE, ModGuiIcons.ICON_SIZE))); if (isAnyCancelled()) { lines.add(new SaveableNavigatorDataLine(TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".route_overview.cancelled").withStyle(ChatFormatting.RED), ModGuiIcons.IMPORTANT.getAsSprite(ModGuiIcons.ICON_SIZE, ModGuiIcons.ICON_SIZE))); diff --git a/common/src/main/java/de/mrjulsen/crn/data/navigation/RoutePart.java b/common/src/main/java/de/mrjulsen/crn/data/navigation/RoutePart.java index 9e95601f..b0761907 100644 --- a/common/src/main/java/de/mrjulsen/crn/data/navigation/RoutePart.java +++ b/common/src/main/java/de/mrjulsen/crn/data/navigation/RoutePart.java @@ -139,7 +139,7 @@ public Set getStatus() { } private static Set> getBetween(TrainSchedule schedule, StationTag start, StationTag end, UserSettings settings) { - List stops = schedule.getAllStops().stream().sorted((a, b) -> Long.compare(a.getScheduledDepartureTime(), b.getScheduledDepartureTime())).toList(); + List stops = schedule.getAllStopsChronologicallyDeparture(); if (stops.stream().noneMatch(x -> x.getTag().equals(start)) || stops.stream().noneMatch(x -> x.getTag().equals(end))) { return Set.of(); @@ -193,10 +193,14 @@ public CompoundTag toNbt() { nbt.putUUID(NBT_SESSION_ID, sessionId); nbt.putUUID(NBT_TRAIN_ID, trainId); ListTag stopsList = new ListTag(); - stopsList.addAll(routeStops.stream().map(x -> x.toNbt(true)).toList()); + for (TrainStop stop : routeStops) { + stopsList.add(stop.toNbt(true)); + } nbt.put(NBT_STOPS, stopsList); ListTag journeyList = new ListTag(); - journeyList.addAll(allStops.stream().map(x -> x.toNbt(true)).toList()); + for (TrainStop stop : allStops) { + journeyList.add(stop.toNbt(true)); + } nbt.put(NBT_JOURNEY, journeyList); return nbt; } diff --git a/common/src/main/java/de/mrjulsen/crn/data/navigation/TrainSchedule.java b/common/src/main/java/de/mrjulsen/crn/data/navigation/TrainSchedule.java index 43b8c06a..b0f77593 100644 --- a/common/src/main/java/de/mrjulsen/crn/data/navigation/TrainSchedule.java +++ b/common/src/main/java/de/mrjulsen/crn/data/navigation/TrainSchedule.java @@ -10,6 +10,7 @@ import de.mrjulsen.crn.data.StationTag; import de.mrjulsen.crn.data.train.TrainListener; import de.mrjulsen.crn.data.train.TrainStop; +import de.mrjulsen.mcdragonlib.config.ECachingPriority; import de.mrjulsen.mcdragonlib.data.Cache; public class TrainSchedule { @@ -17,6 +18,7 @@ public class TrainSchedule { private final Train train; private final List stops; private final Cache> stopsChronologically = new Cache<>(() -> getAllStops().stream().sorted((a, b) -> Long.compare(a.getScheduledArrivalTime(), b.getScheduledArrivalTime())).toList()); + private final Cache> stopsChronologicallyDeparture = new Cache<>(() -> getAllStops().stream().sorted((a, b) -> Long.compare(a.getScheduledDepartureTime(), b.getScheduledDepartureTime())).toList(), ECachingPriority.LOW); private boolean simulated; private long simulationTime; @@ -46,6 +48,10 @@ public List getAllStops() { public List getAllStopsChronologically() { return stopsChronologically.get(); } + + public List getAllStopsChronologicallyDeparture() { + return stopsChronologicallyDeparture.get(); + } public UUID getSessionId() { return sessionId; @@ -56,7 +62,12 @@ public Train getTrain() { } public boolean stopsAt(StationTag tag) { - return stops.stream().anyMatch(x -> x.getTag().equals(tag)); + for (TrainStop stop : stops) { + if (stop.getTag().equals(tag)) { + return true; + } + } + return false; } public TrainSchedule simulate(long ticks) { @@ -77,13 +88,24 @@ public boolean isEqual(TrainSchedule other) { if (other == null) { return false; } - if (getAllStops().size() != other.getAllStops().size()) { - return false; + + List allStops = getAllStops(); + List otherAllStops = other.getAllStops(); + synchronized (allStops) { + synchronized (otherAllStops) { + if (allStops.size() != otherAllStops.size()) { + return false; + } + + Set otherTags = new HashSet<>(otherAllStops.size()); + otherAllStops.forEach(x -> otherTags.add(x.getTag().getTagName().get())); + for (TrainStop stop : allStops) { + if (!otherTags.contains(stop.getTag().getTagName().get())) { + return false; + } + } + return true; + } } - Set tagsA = new HashSet<>(); - Set tagsB = new HashSet<>(); - getAllStops().stream().forEach(x -> tagsA.add(x.getTag().getTagName().get())); - other.getAllStops().stream().forEach(x -> tagsB.add(x.getTag().getTagName().get())); - return tagsA.size() == tagsB.size() && tagsA.stream().allMatch(x -> tagsB.contains(x)); } } diff --git a/common/src/main/java/de/mrjulsen/crn/data/schedule/IConditionsRequiresInstruction.java b/common/src/main/java/de/mrjulsen/crn/data/schedule/IConditionsRequiresInstruction.java new file mode 100644 index 00000000..08949b70 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/data/schedule/IConditionsRequiresInstruction.java @@ -0,0 +1,4 @@ +package de.mrjulsen.crn.data.schedule; + +public interface IConditionsRequiresInstruction { +} diff --git a/common/src/main/java/de/mrjulsen/crn/data/schedule/INavigationExtension.java b/common/src/main/java/de/mrjulsen/crn/data/schedule/INavigationExtension.java new file mode 100644 index 00000000..872a2070 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/data/schedule/INavigationExtension.java @@ -0,0 +1,10 @@ +package de.mrjulsen.crn.data.schedule; + +import de.mrjulsen.crn.data.schedule.condition.IDelayedWaitCondition; +import de.mrjulsen.crn.data.schedule.condition.IDelayedWaitCondition.DelayedWaitConditionContext; +import de.mrjulsen.mcdragonlib.data.Pair; + +public interface INavigationExtension { + void addDelayedWaitCondition(Pair pair); + boolean isDelayedWaitConditionPending(); +} diff --git a/common/src/main/java/de/mrjulsen/crn/data/schedule/condition/IDelayedWaitCondition.java b/common/src/main/java/de/mrjulsen/crn/data/schedule/condition/IDelayedWaitCondition.java new file mode 100644 index 00000000..81722903 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/data/schedule/condition/IDelayedWaitCondition.java @@ -0,0 +1,18 @@ +package de.mrjulsen.crn.data.schedule.condition; + +import com.simibubi.create.content.trains.entity.Train; +import com.simibubi.create.content.trains.schedule.ScheduleEntry; +import com.simibubi.create.content.trains.station.GlobalStation; + +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.level.Level; + +@FunctionalInterface +public interface IDelayedWaitCondition { + + + public static final String NBT_DELAY = "Delay"; + + boolean runDelayed(DelayedWaitConditionContext context); + public static record DelayedWaitConditionContext(Level level, Train train, CompoundTag nbt, GlobalStation station, ScheduleEntry scheduleEntry) {} +} diff --git a/common/src/main/java/de/mrjulsen/crn/data/schedule/condition/TrainSeparationCondition.java b/common/src/main/java/de/mrjulsen/crn/data/schedule/condition/TrainSeparationCondition.java new file mode 100644 index 00000000..502b8757 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/data/schedule/condition/TrainSeparationCondition.java @@ -0,0 +1,103 @@ +package de.mrjulsen.crn.data.schedule.condition; + +import java.util.List; +import com.google.common.collect.ImmutableList; +import com.simibubi.create.content.trains.entity.Train; +import com.simibubi.create.content.trains.schedule.ScheduleEntry; +import com.simibubi.create.content.trains.schedule.condition.ScheduledDelay; +import com.simibubi.create.content.trains.schedule.destination.DestinationInstruction; +import com.simibubi.create.foundation.gui.ModularGuiLineBuilder; +import com.simibubi.create.foundation.utility.Pair; + +import de.mrjulsen.crn.CreateRailwaysNavigator; +import de.mrjulsen.crn.client.ClientWrapper; +import de.mrjulsen.crn.data.schedule.IConditionsRequiresInstruction; +import de.mrjulsen.crn.data.schedule.INavigationExtension; +import de.mrjulsen.crn.data.train.StationDepartureHistory; +import de.mrjulsen.crn.data.train.StationDepartureHistory.ETrainFilter; +import de.mrjulsen.mcdragonlib.DragonLib; +import de.mrjulsen.mcdragonlib.util.TextUtils; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.ChatFormatting; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.Level; + +public class TrainSeparationCondition extends ScheduledDelay implements IDelayedWaitCondition, IConditionsRequiresInstruction { + + public static final String NBT_TIME = "Value"; + public static final String NBT_TRAIN_FILTER = "TrainFilter"; + public static final String NBT_TIME_UNIT = "TimeUnit"; + + public TrainSeparationCondition() { + super(); + data.putByte(NBT_TRAIN_FILTER, ETrainFilter.ANY.getIndex()); + } + + @Override + public Pair getSummary() { + return Pair.of(ItemStack.EMPTY, TextUtils.translate(CreateRailwaysNavigator.MOD_ID + ".schedule.condition." + getId().getPath() + ".title", formatTime(true))); + } + + @Override + public ItemStack getSecondLineIcon() { + return new ItemStack(Items.OBSERVER); + } + + @Override + public List getTitleAs(String type) { + return ImmutableList.of( + TextUtils.translate(CreateRailwaysNavigator.MOD_ID + ".schedule." + type + "." + getId().getPath()), + TextUtils.translate(CreateRailwaysNavigator.MOD_ID + ".schedule." + type + "." + getId().getPath() + ".description", + formatTime(false) + ).withStyle(ChatFormatting.DARK_AQUA), + TextUtils.translate(getTrainFilter().getValueTranslationKey(CreateRailwaysNavigator.MOD_ID)).withStyle(ChatFormatting.AQUA) + ); + } + + @Override + public boolean tickCompletion(Level level, Train train, CompoundTag context) { + ScheduleEntry entry = train.runtime.getSchedule().entries.get(train.runtime.currentEntry); + ((INavigationExtension)(Object)train.navigation).addDelayedWaitCondition(de.mrjulsen.mcdragonlib.data.Pair.of(this, new DelayedWaitConditionContext(level, train, context, train.getCurrentStation(), entry))); + return true; + } + + + @Override + public boolean runDelayed(DelayedWaitConditionContext context) { + int delayValue = totalWaitTicks(); + long lastDepartureTimestamp = Long.MIN_VALUE; + String stationName = ""; + ScheduleEntry entry = context.scheduleEntry(); + if (entry.instruction instanceof DestinationInstruction instruction) { + stationName = instruction.getFilter(); + lastDepartureTimestamp = StationDepartureHistory.getLastMatchingDepartureTime(getTrainFilter(), context.train(), stationName); + } + + if (lastDepartureTimestamp + delayValue < DragonLib.getCurrentServer().get().overworld().getGameTime()) { + StationDepartureHistory.updateDepartureHistory(context.train(), context.station().name); + return true; + } + return false; + } + + @Override + public ResourceLocation getId() { + return new ResourceLocation(CreateRailwaysNavigator.MOD_ID, "train_separation"); + } + + public ETrainFilter getTrainFilter() { + return ETrainFilter.getByIndex(data.getByte(NBT_TRAIN_FILTER)); + } + + @Override + @Environment(EnvType.CLIENT) + public void initConfigurationWidgets(ModularGuiLineBuilder builder) { + ClientWrapper.initTimingAdjustmentGui(this, builder); + } + +} diff --git a/common/src/main/java/de/mrjulsen/crn/data/schedule/instruction/ResetTimingsInstruction.java b/common/src/main/java/de/mrjulsen/crn/data/schedule/instruction/ResetTimingsInstruction.java index a5b54bac..25ebd90e 100644 --- a/common/src/main/java/de/mrjulsen/crn/data/schedule/instruction/ResetTimingsInstruction.java +++ b/common/src/main/java/de/mrjulsen/crn/data/schedule/instruction/ResetTimingsInstruction.java @@ -63,4 +63,6 @@ public void run(ScheduleRuntime runtime, TrainData data, Train train, int index) @Override public void predict(TrainData data, ScheduleRuntime runtime, int indexInSchedule, Train train) { } + + } \ No newline at end of file diff --git a/common/src/main/java/de/mrjulsen/crn/data/schedule/instruction/TravelSectionInstruction.java b/common/src/main/java/de/mrjulsen/crn/data/schedule/instruction/TravelSectionInstruction.java index 114e8eb2..67045076 100644 --- a/common/src/main/java/de/mrjulsen/crn/data/schedule/instruction/TravelSectionInstruction.java +++ b/common/src/main/java/de/mrjulsen/crn/data/schedule/instruction/TravelSectionInstruction.java @@ -76,7 +76,7 @@ public List getTitleAs(String type) { /** HERE BE DRAGONS! This code is very illegal, but it works... */ @Override @Environment(EnvType.CLIENT) - public void initConfigurationWidgets(ModularGuiLineBuilder builder) { + public void initConfigurationWidgets(ModularGuiLineBuilder builder) { ClientWrapper.initScheduleSectionInstruction(this, builder); } diff --git a/common/src/main/java/de/mrjulsen/crn/data/storage/GlobalSettings.java b/common/src/main/java/de/mrjulsen/crn/data/storage/GlobalSettings.java index 91113968..5cf6a75d 100644 --- a/common/src/main/java/de/mrjulsen/crn/data/storage/GlobalSettings.java +++ b/common/src/main/java/de/mrjulsen/crn/data/storage/GlobalSettings.java @@ -15,10 +15,12 @@ import java.util.HashMap; import java.util.HashSet; import java.util.LinkedHashSet; +import java.util.List; import java.util.Optional; import java.util.Map; import de.mrjulsen.crn.CreateRailwaysNavigator; +import de.mrjulsen.crn.config.ModCommonConfig; import de.mrjulsen.crn.data.StationTag; import de.mrjulsen.crn.data.TagName; import de.mrjulsen.crn.data.TrainGroup; @@ -99,7 +101,7 @@ public synchronized void save() { try { NbtIo.writeCompressed(nbt, new File(server.getWorldPath(new LevelResource("data/" + FILENAME)).toString())); - CreateRailwaysNavigator.LOGGER.info("Saved global settings."); + if (ModCommonConfig.ADVANCED_LOGGING.get()) CreateRailwaysNavigator.LOGGER.info("Saved global settings."); } catch (IOException e) { CreateRailwaysNavigator.LOGGER.error("Unable to save global settings.", e); } @@ -121,7 +123,7 @@ public synchronized static GlobalSettings open(MinecraftServer server) throws IO return file; } - public CompoundTag serializeNbt() { + public synchronized CompoundTag serializeNbt() { CompoundTag nbt = new CompoundTag(); nbt.putInt(NBT_VERSION, DATA_VERSION); @@ -134,11 +136,11 @@ public CompoundTag serializeNbt() { nbt.put(NBT_TRAIN_GROUPS, trainGroupComp); ListTag stationsBlacklist = new ListTag(); - this.stationBlacklist.stream().forEach(x -> stationsBlacklist.add(StringTag.valueOf(x))); + this.stationBlacklist.forEach(x -> stationsBlacklist.add(StringTag.valueOf(x))); nbt.put(NBT_STATION_BLACKLIST, stationsBlacklist); ListTag trainsBlacklist = new ListTag(); - this.trainBlacklist.stream().forEach(x -> trainsBlacklist.add(StringTag.valueOf(x))); + this.trainBlacklist.forEach(x -> trainsBlacklist.add(StringTag.valueOf(x))); nbt.put(NBT_TRAIN_BLACKLIST, trainsBlacklist); CompoundTag trainLinesComp = new CompoundTag(); @@ -166,7 +168,7 @@ public void deserializeNbt(CompoundTag nbt) { * @deprecated For data migration only. Use {@code deserializeNbt} instead. */ @Deprecated - public void deserializeNbtLegacy(CompoundTag nbt) { + private void deserializeNbtLegacy(CompoundTag nbt) { final String NBT_ALIAS_REGISTRY = "RegisteredAliasData"; final String NBT_BLACKLIST = "StationBlacklist"; final String NBT_TRAIN_BLACKLIST = "TrainBlacklist"; @@ -221,7 +223,12 @@ public boolean hasStationTag(GlobalStation station) { } public boolean hasStationTag(String stationName) { - return stationTags.values().stream().anyMatch(x -> x.contains(stationName)); + for (StationTag tag : stationTags.values()) { + if (tag.contains(stationName)) { + return true; + } + } + return false; } public boolean stationTagExists(String tagName) { @@ -229,7 +236,12 @@ public boolean stationTagExists(String tagName) { } public boolean stationTagExists(TagName tagName) { - return stationTags.values().stream().anyMatch(x -> x.getTagName().equals(tagName)); + for (StationTag tag : stationTags.values()) { + if (tag.getTagName().equals(tagName)) { + return true; + } + } + return false; } public boolean stationTagExists(UUID id) { @@ -253,19 +265,22 @@ public StationTag getOrCreateStationTagFor(String stationName) { return getOrCreateTagForWildcard(stationName); } - Optional a = stationTags.values().stream().filter(x -> x.contains(stationName)).findFirst(); - if (a.isPresent()) { - return a.get(); + for (StationTag tag : stationTags.values()) { + if (tag.contains(stationName)) { + return tag; + } } - return new StationTag(null, TagName.of(stationName), Map.of(stationName, StationInfo.empty())); } private StationTag getOrCreateTagForWildcard(String stationName) { String regex = stationName.isBlank() ? stationName : "\\Q" + stationName.replace("*", "\\E.*\\Q") + "\\E"; - Optional a = stationTags.values().stream().filter(x -> x.getAllStationNames().stream().anyMatch(y -> y.matches(regex))).findFirst(); - if (a.isPresent()) { - return a.get(); + for (StationTag tag : stationTags.values()) { + for (String name : tag.getAllStationNames()) { + if (name.matches(regex)) { + return tag; + } + } } return new StationTag(null, TagName.of(stationName), Map.of(stationName, StationInfo.empty())); @@ -310,7 +325,12 @@ public StationTag registerStationTag(StationTag tag) { } public Optional getTagByName(TagName name) { - return stationTags.values().stream().filter(x -> x.getTagName().equals(name)).findFirst(); + for (StationTag tag : stationTags.values()) { + if (tag.getTagName().equals(name)) { + return Optional.ofNullable(tag); + } + } + return Optional.empty(); } public Optional getStationTag(UUID id) { @@ -329,8 +349,8 @@ public StationTag removeStationTag(UUID id) { return stationTags.remove(id); } - public ImmutableList getAllStationTags() { - return ImmutableList.copyOf(stationTags.values()); + public List getAllStationTags() { + return new ArrayList<>(stationTags.values()); } //#endregion @@ -367,20 +387,26 @@ public ImmutableList getAllTrainGroups() { return ImmutableList.copyOf(trainGroups.values()); } - public boolean isTrainExcludedByUser(Train train, UserSettings settings) { - return !TrainListener.data.get(train.id).getSections().isEmpty() && TrainListener.data.get(train.id).getSections().stream().allMatch(x -> !x.isUsable() || (x.getTrainGroup() != null && settings.navigationExcludedTrainGroups.getValue().contains(x.getTrainGroup().getGroupName()))); - //List groupsOfTrain = getTrainGroupsOfTrain(train); - //Set excludedGroups = settings.navigationExcludedTrainGroups.getValue(); - //return !groupsOfTrain.isEmpty() && !excludedGroups.isEmpty() && groupsOfTrain.stream().allMatch(a -> excludedGroups.stream().anyMatch(b -> a.getId().equals(b.getId()))); + public boolean isTrainExcludedByUser(Train train, UserSettings settings) { + if (TrainListener.data.get(train.id).getSections().isEmpty()) { + return false; + } + + for (TrainTravelSection section : TrainListener.data.get(train.id).getSections()) { + if (section.isUsable() && !(section.getTrainGroup().map(x -> settings.navigationExcludedTrainGroups.getValue().contains(x.getGroupName())).orElse(false))) { + return false; + } + } + return true; } public boolean isTrainStationExcludedByUser(Train train, TrainPrediction at, UserSettings settings) { - return at.getSection().getTrainGroup() != null && (!at.getSection().isUsable() || (at.getSection().getTrainGroup() != null && settings.navigationExcludedTrainGroups.getValue().contains(at.getSection().getTrainGroup().getGroupName()))); + return at.getSection().getTrainGroup().map(x -> !at.getSection().isUsable() || (settings.navigationExcludedTrainGroups.getValue().contains(x.getGroupName()))).orElse(false); } public boolean isTrainStationExcludedByUser(Train train, TrainStop at, UserSettings settings) { TrainTravelSection section = TrainListener.data.get(train.id).getSectionByIndex(at.getSectionIndex()); - return section.getTrainGroup() != null && (!section.isUsable() || (section.getTrainGroup() != null && settings.navigationExcludedTrainGroups.getValue().contains(section.getTrainGroup().getGroupName()))); + return section.getTrainGroup().map(x -> !section.isUsable() || (settings.navigationExcludedTrainGroups.getValue().contains(x.getGroupName()))).orElse(false); } //#endregion @@ -414,7 +440,14 @@ public boolean isEntireStationTagBlacklisted(StationTag tag) { if (tag == null) { return true; } - return tag.getAllStationNames().stream().allMatch(x -> isStationBlacklisted(x)); + + Collection names = tag.getAllStationNames(); + for (String name : names) { + if (!isStationBlacklisted(name)) { + return false; + } + } + return !names.isEmpty(); } public ImmutableList getAllBlacklistedStations() { @@ -448,15 +481,6 @@ public boolean removeTrainFromBlacklist(String trainName) { return trainBlacklist.removeIf(x -> x.equals(trainName)); } - /* TODO - public boolean isEntireTrainGroupBlacklisted(TrainGroup tag) { - if (tag == null) { - return true; - } - return tag.getTrainNames().stream().allMatch(x -> isTrainBlacklisted(x)); - } - */ - public ImmutableList getAllBlacklistedTrains() { return ImmutableList.copyOf(trainBlacklist); } diff --git a/common/src/main/java/de/mrjulsen/crn/data/train/StationDepartureHistory.java b/common/src/main/java/de/mrjulsen/crn/data/train/StationDepartureHistory.java new file mode 100644 index 00000000..d78140dc --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/data/train/StationDepartureHistory.java @@ -0,0 +1,369 @@ +package de.mrjulsen.crn.data.train; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; +import javax.annotation.Nullable; + +import com.simibubi.create.content.trains.entity.Train; +import com.simibubi.create.content.trains.station.GlobalStation; + +import de.mrjulsen.crn.data.TrainGroup; +import de.mrjulsen.crn.data.TrainLine; +import de.mrjulsen.mcdragonlib.DragonLib; +import de.mrjulsen.mcdragonlib.config.ECachingPriority; +import de.mrjulsen.mcdragonlib.core.ITranslatableEnum; +import de.mrjulsen.mcdragonlib.data.MapCache; +import net.minecraft.nbt.CompoundTag; + +public final class StationDepartureHistory { + + private StationDepartureHistory() {} + + public static final ConcurrentHashMap trainDepartures = new ConcurrentHashMap<>(); + private static final ConcurrentHashMap> departureInputKeyByStation = new ConcurrentHashMap<>(); + + + public static String debug_departureHistory() { + long a = trainDepartures.size(); + long b = trainDepartures.values().stream().mapToLong(x -> x.debug_cachedDataCount()).sum(); + long c = departureInputKeyByStation.size(); + long d = departureInputKeyByStation.values().stream().mapToLong(x -> x.size()).sum(); + long e = departureDataCache.getCachedDataCount(); + long f = lastDepartureTimeDataCache.getCachedDataCount(); + + return String.format("DH: [%s,%s]/[%s,%s]/[%s,%s]", a, b, c, d, e, f); + } + + private static record DepartureTimeInputDataKey(ETrainFilter filter, UUID train, String stationName) { + @Override + public final int hashCode() { + return Objects.hash(filter.getIndex(), train, stationName); + } + @Override + public final boolean equals(Object a) { + if (a instanceof DepartureTimeInputDataKey o) { + return filter == o.filter && train.equals(o.train) && stationName.equals(o.stationName); + } + return false; + } + } + + private static final MapCache, String, String> departureDataCache = new MapCache<>((stationName) -> { + List departureData = new ArrayList<>(); + + if (stationName.contains("*")) { + String regex = stationName.isBlank() ? stationName : "\\Q" + stationName.replace("*", "\\E.*\\Q") + "\\E"; + for (Map.Entry e : trainDepartures.entrySet()) { + if (!e.getKey().matches(regex)) continue; + departureData.add(e.getValue()); + } + } else if (trainDepartures.containsKey(stationName)) { + departureData.add(trainDepartures.get(stationName)); + } + + return departureData; + }, String::hashCode, ECachingPriority.LOW); + + private static final MapCache lastDepartureTimeDataCache = new MapCache<>((key) -> { + long time = Long.MIN_VALUE; + TrainTravelSection section = null; + + if (TrainListener.data.containsKey(key.train())) { + section = TrainListener.data.get(key.train()).getCurrentSection(); + } + + List data = departureDataCache.get(key.stationName(), key.stationName()); + for (Data d : data) { + long newTime = d.getLastDepartureTime(key.filter(), section); + time = Math.max(newTime, time); + } + + return time; + }, DepartureTimeInputDataKey::hashCode, ECachingPriority.LOW); + + + public static synchronized long getLastMatchingDepartureTime(ETrainFilter filter, Train train, String stationName) { + DepartureTimeInputDataKey key = new DepartureTimeInputDataKey(filter, train.id, stationName); + departureInputKeyByStation.computeIfAbsent(stationName, x -> new HashSet<>()).add(key); + return lastDepartureTimeDataCache.get(key, key); + } + + public static synchronized List getAllDeparturesAt(String stationName) { + return departureDataCache.get(stationName, stationName); + } + + public static boolean hasDepartureHistory(String stationName) { + return trainDepartures.containsKey(stationName); + } + + public static synchronized void updateDepartureHistory(Train train, String stationName) { + if (train == null || stationName == null || stationName.isEmpty()) return; + trainDepartures.computeIfAbsent(stationName, x -> new Data()).setDeparture(train); + if (departureInputKeyByStation.containsKey(stationName)) { + Set keys = departureInputKeyByStation.remove(stationName); + for (DepartureTimeInputDataKey key : keys) { + lastDepartureTimeDataCache.clear(key); + } + } + departureDataCache.clear(stationName); + } + + public static synchronized void cleanUpDepartureHistory() { + Collection stations = TrainUtils.getAllStations(); + Collection stationNames = new ArrayList<>(stations.size()); + for (GlobalStation s : stations) { + stationNames.add(s.name); + } + if (trainDepartures.keySet().retainAll(stationNames)) { + lastDepartureTimeDataCache.clearAll(); + departureDataCache.clearAll(); + } + } + + public static synchronized void clearAll() { + trainDepartures.clear(); + departureInputKeyByStation.clear(); + departureDataCache.clearAll(); + lastDepartureTimeDataCache.clearAll(); + } + + + + public static class Data { + private long lastDepartureTime = Long.MIN_VALUE; + private Map lastDepartureByLine = new ConcurrentHashMap<>(); + private Map lastDepartureByGroup = new ConcurrentHashMap<>(); + + public void setDeparture(Train train) { + this.lastDepartureTime = DragonLib.getCurrentServer().get().overworld().getGameTime(); + if (TrainListener.data.containsKey(train.id)) { + TrainData trainData = TrainListener.data.get(train.id); + TrainTravelSection section = trainData.getCurrentSection(); + section.getTrainLine().ifPresent(x -> this.lastDepartureByLine.put(x, this.lastDepartureTime)); + section.getTrainGroup().ifPresent(x -> this.lastDepartureByGroup.put(x, this.lastDepartureTime)); + } + } + + public long getLastDepartureTime(ETrainFilter filter, @Nullable TrainTravelSection section) { + return switch (filter) { + case SAME_GROUP -> section != null ? section.getTrainGroup().map(x -> lastDepartureByGroup.getOrDefault(x, Long.MIN_VALUE)).orElse(Long.MIN_VALUE) : Long.MIN_VALUE; + case SAME_LINE -> section != null ? section.getTrainLine().map(x -> lastDepartureByLine.getOrDefault(x, Long.MIN_VALUE)).orElse(Long.MIN_VALUE) : Long.MIN_VALUE; + default -> lastDepartureTime; + }; + } + + public long getLastDepartureTime() { + return lastDepartureTime; + } + + public Map getLastDepartureByLine() { + return lastDepartureByLine; + } + + public Map getLastDepartureByGroup() { + return lastDepartureByGroup; + } + + public long debug_cachedDataCount() { + return 1 + lastDepartureByLine.size() + lastDepartureByGroup.size(); + } + } + + public static class StationStats { + + private static final String NBT_NAME = "Name"; + private static final String NBT_DEPARTURE_TIME = "LastDepartureTime"; + private static final String NBT_LINE = "Line"; + private static final String NBT_GROUP = "Group"; + private static final String NBT_LINE_COUNT = "LineCount"; + private static final String NBT_GROUP_COUNT = "GroupCount"; + + private final String stationName; + private final long lastDepartureTime; + + // On server + private final Map departuresByLine; + private final Map departuresByGroup; + + // On client + private final List> departuresListByLine; + private final List> departuresListByGroup; + private final int departuresByLineTotalCount; + private final int departuresByGroupTotalCount; + + public StationStats(String stationName) { + this.stationName = stationName; + List departures = StationDepartureHistory.getAllDeparturesAt(stationName); + long lastDepartureTime = Long.MIN_VALUE; + departuresByLine = new HashMap<>(); + departuresByGroup = new HashMap<>(); + for (StationDepartureHistory.Data data : departures) { + lastDepartureTime = Math.max(lastDepartureTime, data.getLastDepartureTime(ETrainFilter.ANY, null)); + for (Map.Entry line : data.getLastDepartureByLine().entrySet()) { + departuresByLine.merge(line.getKey().getLineName(), line.getValue(), (k, v) -> Math.max(v, line.getValue())); + } + for (Map.Entry line : data.getLastDepartureByGroup().entrySet()) { + departuresByGroup.merge(line.getKey().getGroupName(), line.getValue(), (k, v) -> Math.max(v, line.getValue())); + } + } + this.lastDepartureTime = lastDepartureTime; + this.departuresListByLine = null; + this.departuresListByGroup = null; + departuresByLineTotalCount = 0; + departuresByGroupTotalCount = 0; + } + + private StationStats(String stationName, long lastDepartureTime, List> departuresByLine, List> departuresByGroup, int linesCount, int groupsCount) { + this.stationName = stationName; + this.lastDepartureTime = lastDepartureTime; + this.departuresListByLine = departuresByLine; + this.departuresListByGroup = departuresByGroup; + this.departuresByLine = null; + this.departuresByGroup = null; + this.departuresByLineTotalCount = linesCount; + this.departuresByGroupTotalCount = groupsCount; + } + + public static StationStats empty() { + return new StationStats("", -1, null, null, 0, 0); + } + + public boolean isEmpty() { + return lastDepartureTime < 0 && !hasDeparturesByLine() && !hasDeparturesByGroup(); + } + + public boolean hasDeparturesByLine() { + return departuresListByLine != null && !departuresListByLine.isEmpty(); + } + + public boolean hasDeparturesByGroup() { + return departuresListByGroup != null && !departuresListByGroup.isEmpty(); + } + + public CompoundTag toNbt() { + CompoundTag nbt = new CompoundTag(); + nbt.putString(NBT_NAME, stationName); + nbt.putLong(NBT_DEPARTURE_TIME, lastDepartureTime); + + CompoundTag map1 = new CompoundTag(); + int i = 0; + for (Map.Entry e : departuresByLine.entrySet()) { + map1.putLong(e.getKey(), e.getValue()); + i++; + if (i > 5) break; + } + nbt.put(NBT_LINE, map1); + + CompoundTag map2 = new CompoundTag(); + i = 0; + for (Map.Entry e : departuresByGroup.entrySet()) { + map2.putLong(e.getKey(), e.getValue()); + i++; + if (i > 5) break; + } + nbt.put(NBT_GROUP, map2); + nbt.putInt(NBT_LINE_COUNT, departuresByLine.size()); + nbt.putInt(NBT_GROUP_COUNT, departuresByGroup.size()); + return nbt; + } + + public static StationStats fromNbt(CompoundTag nbt) { + Map departuresByLine = new HashMap<>(); + Map departuresByGroup = new HashMap<>(); + + CompoundTag map1 = nbt.getCompound(NBT_LINE); + for (String key : map1.getAllKeys()) { + departuresByLine.put(key, map1.getLong(key)); + } + + CompoundTag map2 = nbt.getCompound(NBT_GROUP); + for (String key : map2.getAllKeys()) { + departuresByGroup.put(key, map2.getLong(key)); + } + + List> sortedLines = new ArrayList<>(departuresByLine.entrySet()); + sortedLines.sort(Map.Entry.comparingByValue((a, b) -> Long.compare(a, b) * -1)); + List> sortedGroups = new ArrayList<>(departuresByGroup.entrySet()); + sortedGroups.sort(Map.Entry.comparingByValue((a, b) -> Long.compare(a, b) * -1)); + + return new StationStats( + nbt.getString(NBT_NAME), + nbt.getLong(NBT_DEPARTURE_TIME), + sortedLines, + sortedGroups, + nbt.getInt(NBT_LINE_COUNT), + nbt.getInt(NBT_GROUP_COUNT) + ); + } + + public String getStationName() { + return stationName; + } + + public long getLastDepartureTime() { + return lastDepartureTime; + } + + public List> getDeparturesByLine() { + return departuresListByLine; + } + + public List> getDeparturesByGroup() { + return departuresListByGroup; + } + + public int getDeparturesByLineTotalCount() { + return departuresByLineTotalCount; + } + + public int getDeparturesByGroupTotalCount() { + return departuresByGroupTotalCount; + } + } + + + public static enum ETrainFilter implements ITranslatableEnum { + ANY((byte)0, "any"), + SAME_LINE((byte)1, "same_line"), + SAME_GROUP((byte)2, "same_group"); + + final byte index; + final String name; + + ETrainFilter(byte index, String name) { + this.index = index; + this.name = name; + } + + public byte getIndex() { + return index; + } + + public String getName() { + return name; + } + + public static ETrainFilter getByIndex(int index) { + return Arrays.stream(values()).filter(x -> x.getIndex() == index).findFirst().orElse(ANY); + } + + @Override + public String getEnumName() { + return "train_filter"; + } + + @Override + public String getEnumValueName() { + return name; + } + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/data/train/TrainData.java b/common/src/main/java/de/mrjulsen/crn/data/train/TrainData.java index 48ff4576..3cd094b2 100644 --- a/common/src/main/java/de/mrjulsen/crn/data/train/TrainData.java +++ b/common/src/main/java/de/mrjulsen/crn/data/train/TrainData.java @@ -8,7 +8,6 @@ import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; import java.util.function.Consumer; -import java.util.stream.Collectors; import java.util.Map.Entry; import java.util.Map; import java.util.ArrayList; @@ -16,7 +15,6 @@ import java.util.HashSet; import java.util.IdentityHashMap; -import com.google.common.collect.ImmutableMap; import com.simibubi.create.content.trains.display.GlobalTrainDisplayData.TrainDeparturePrediction; import com.simibubi.create.content.trains.entity.Train; @@ -25,13 +23,14 @@ import de.mrjulsen.crn.util.ModUtils; import de.mrjulsen.crn.event.CRNEventsManager; import de.mrjulsen.crn.event.events.TotalDurationTimeChangedEvent; +import de.mrjulsen.crn.mixin.ScheduleRuntimeAccessor; import de.mrjulsen.crn.data.TrainInfo; import de.mrjulsen.crn.data.schedule.condition.DynamicDelayCondition; -import de.mrjulsen.crn.data.train.TrainStatus.CompiledTrainStatus; import de.mrjulsen.crn.data.train.TrainStatus.TrainStatusType; import de.mrjulsen.crn.util.IListenable; import de.mrjulsen.crn.util.LockedList; import de.mrjulsen.mcdragonlib.DragonLib; +import de.mrjulsen.mcdragonlib.config.ECachingPriority; import de.mrjulsen.mcdragonlib.data.Cache; import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; @@ -65,11 +64,11 @@ public class TrainData implements IListenable { private UUID sessionId; private final ConcurrentHashMap predictionsByIndex = new ConcurrentHashMap<>(); private transient final ConcurrentHashMap sectionsByIndex = new ConcurrentHashMap<>(); - private transient final Cache defaultSection = new Cache<>(() -> TrainTravelSection.def(this)); + private transient final Cache defaultSection = new Cache<>(() -> TrainTravelSection.def(this), ECachingPriority.LOW); private transient final List predictionsChronologically = new LockedList<>(); private transient final Set validPredictionEntries = new HashSet<>(); private transient final Cache isDynamic = new Cache<>(() -> getTrain().runtime.getSchedule().entries.stream().anyMatch(x -> x.conditions.stream().flatMap(y -> y.stream()).anyMatch(y -> y instanceof DynamicDelayCondition c && c.minWaitTicks() < c.totalWaitTicks()))); - + private int currentScheduleIndex = INVALID; private transient int currentTravelSectionIndex = INVALID; private transient int lastScheduleIndex = INVALID; @@ -114,6 +113,47 @@ public class TrainData implements IListenable { // temp mem private boolean sectionChanged; private boolean destinationChanged; + + // Cache + /* + private transient final Cache> statusCache = new Cache<>(() -> { + Set status = new HashSet<>(currentStatusInfos.size()); + for (ResourceLocation loc : currentStatusInfos) { + status.add(TrainStatus.Registry.getRegisteredStatus().get(loc).compile()); + } + return status; + }, ECachingPriority.LOW); + */ + private final Cache isDelayedCache = new Cache<>(() -> { + for (TrainPrediction pred : predictionsChronologically) { + if (pred.isAnyDelayed()) { + return true; + } + } + return false; + }); + private final Cache highestDeviationCache = new Cache<>(() -> { + long max = 0; + for (TrainPrediction pred : predictionsByIndex.values()) { + long m = Math.max(pred.getArrivalTimeDeviation(), pred.getDepartureTimeDeviation()); + if (m > max) { + max = m; + } + } + return max; + }); + private final Cache currentSectionCache = new Cache<>(() -> { + return currentTravelSectionIndex < 0 || !hasCustomTravelSections() || !sectionsByIndex.containsKey(currentTravelSectionIndex) ? + defaultSection.get() : + sectionsByIndex.get(currentTravelSectionIndex) + ; + }); + private final Cache> sectionsCache = new Cache<>(() -> { + return sectionsByIndex.isEmpty() ? + List.of(defaultSection.get()) : + sectionsByIndex.values().stream().sorted((a, b) -> Integer.compare(a.getScheduleIndex(), b.getScheduleIndex())).toList() + ; + }); /* PLEASE NOTE! * Chronologically update order (once every ~5 seconds): @@ -160,7 +200,7 @@ public Train getTrain() { } public TrainInfo getTrainInfo(int scheduleIndex) { - return new TrainInfo(getSectionForIndex(scheduleIndex).getTrainLine(), getSectionForIndex(scheduleIndex).getTrainGroup()); + return new TrainInfo(getSectionForIndex(scheduleIndex).getTrainLine().orElse(null), getSectionForIndex(scheduleIndex).getTrainGroup().orElse(null)); } /** @@ -206,16 +246,13 @@ public boolean isWaitingAtStation() { return isAtStation; } - public TrainTravelSection getCurrentTravelSection() { - return currentTravelSectionIndex < 0 || !sectionsByIndex.containsKey(currentTravelSectionIndex) ? defaultSection.get() : sectionsByIndex.get(currentTravelSectionIndex); - } - public TrainTravelSection getSectionByIndex(int scheduleIndex) { return sectionsByIndex.isEmpty() ? defaultSection.get() : sectionsByIndex.get(scheduleIndex); } public void addTravelSection(TrainTravelSection section) { this.sectionsByIndex.put(section.getScheduleIndex(), section); + sectionsCache.clear(); } public String getCurrentTitle() { @@ -225,6 +262,10 @@ public String getCurrentTitle() { public String getTrainName() { return train.name.getString(); } + + public String getTrainDisplayName() { + return getCurrentSection() == null || getCurrentSection().getTrainLine().map(x -> x.getLineName().isEmpty()).orElse(true) ? getTrainName() : getCurrentSection().getTrainLine().get().getLineName(); + } public int getCurrentScheduleIndex() { return currentScheduleIndex; @@ -239,7 +280,7 @@ public boolean isSingleSection() { } public List getSections() { - return sectionsByIndex.isEmpty() ? List.of(defaultSection.get()) : sectionsByIndex.values().stream().sorted((a, b) -> Integer.compare(a.getScheduleIndex(), b.getScheduleIndex())).toList(); + return sectionsCache.get(); } public TrainTravelSection getSectionForIndex(int anyIndex) { @@ -273,12 +314,14 @@ public synchronized Optional getNextStopPrediction() { } public void resetPredictions() { - predictionsByIndex.values().stream().forEach(x -> x.reset()); + for (TrainPrediction pred : predictionsByIndex.values()) { + pred.reset(); + } lastSectionDelayOffset = 0; refreshTimingsCounter = 0; resetStatus(true); isDynamic.clear(); - if (CreateRailwaysNavigator.isDebug()) CreateRailwaysNavigator.LOGGER.info(getTrainName() + " has reset their scheduled times."); + if (CreateRailwaysNavigator.isDebug() || ModCommonConfig.ADVANCED_LOGGING.get()) CreateRailwaysNavigator.LOGGER.info(getTrainName() + " has reset their scheduled times."); } public void hardResetPredictions() { @@ -286,7 +329,7 @@ public void hardResetPredictions() { } public synchronized boolean isDelayed() { - return predictionsChronologically.stream().anyMatch(TrainPrediction::isAnyDelayed); + return isDelayedCache.get(); } public boolean isCurrentSectionDelayed() { @@ -294,7 +337,7 @@ public boolean isCurrentSectionDelayed() { } public long getHighestDeviation() { - return predictionsByIndex.values().stream().mapToLong(x -> Math.max(x.getArrivalTimeDeviation(), x.getDepartureTimeDeviation())).max().orElse(0); + return highestDeviationCache.get(); } public long getDeviationDelayOffset() { @@ -302,16 +345,23 @@ public long getDeviationDelayOffset() { } public TrainTravelSection getCurrentSection() { - return currentTravelSectionIndex < 0 || !hasCustomTravelSections() || !sectionsByIndex.containsKey(currentTravelSectionIndex) ? TrainTravelSection.def(this) : sectionsByIndex.get(currentTravelSectionIndex); + return currentSectionCache.get(); } public Map getWaitingForSignalsTime() { - return ImmutableMap.copyOf(delaysBySignal); + return new HashMap<>(delaysBySignal); + } + + public Set getStatus() { + return currentStatusInfos; } + /* + public Set getStatus() { - return currentStatusInfos.stream().map(x -> TrainStatus.Registry.getRegisteredStatus().get(x).compile(this)).collect(Collectors.toSet()); + return statusCache.get(); } + */ public int debug_statusInfoCount() { return currentStatusInfos.size(); @@ -337,8 +387,19 @@ public void applyStatus() { } } - - if (currentStatusInfos.stream().noneMatch(x -> TrainStatus.Registry.getRegisteredStatus().get(x).getImportance() == TrainStatusType.DELAY && !x.equals(TrainStatus.DEFAULT_DELAY.getLocation())) && isCurrentSectionDelayed()) { + boolean unknownDelayReason = isCurrentSectionDelayed(); + if (unknownDelayReason) { + for (ResourceLocation loc : currentStatusInfos) { + if (TrainStatus.Registry.getRegisteredStatus().get(loc).getImportance() == TrainStatusType.DELAY && + !loc.equals(TrainStatus.DEFAULT_DELAY.getLocation()) + ) { + unknownDelayReason = false; + break; + } + } + } + + if (unknownDelayReason) { currentStatusInfos.add(TrainStatus.DEFAULT_DELAY.getLocation()); } else { currentStatusInfos.remove(TrainStatus.DEFAULT_DELAY.getLocation()); @@ -354,9 +415,15 @@ public boolean hasSectionChanged() { * Trains that have not yet been initialized do not yet contain any reliable data to make any predictions. */ public boolean isInitialized() { - return !currentTransitTime.isEmpty() && - currentTransitTime.values().stream().noneMatch(x -> x < 0) - ; + if (currentTransitTime.isEmpty()) { + return false; + } + for (int i : currentTransitTime.values()) { + if (i < 0) { + return false; + } + } + return true; } public int debug_initializedStationsCount() { @@ -378,7 +445,7 @@ public synchronized TrainPrediction setPredictionData(int entryIndex, int curren // Update CRN predictions with data from Create TrainPrediction pred = predictionsByIndex.computeIfAbsent(entryIndex, i -> new TrainPrediction(this, entryIndex, predictionData, stayDuration, minStayDuration)); - currentTransitTime.computeIfAbsent(entryIndex, x -> -1); + currentTransitTime.computeIfAbsent(entryIndex, x -> ModCommonConfig.USE_CREATE_TRANSIT_TIMES_ON_INIT.get() ? ((ScheduleRuntimeAccessor)train.runtime).crn$predictionTicks().get(entryIndex) : INVALID); validPredictionEntries.add(entryIndex); pred.updateRealTime( @@ -394,6 +461,7 @@ public void changeCurrentSection(int sectionEntryIndex) { sectionChanged = true; lastSectionDelayOffset = Math.max(0, getHighestDeviation()); this.refreshTimingsCounter++; + currentSectionCache.clear(); } private void clearAll() { @@ -408,6 +476,9 @@ private void clearAll() { currentTransitTime.clear(); lastScheduleIndex = INVALID; hasStarted = false; + + sectionsCache.clear(); + resetCaches(); } /** Called every ~5 seconds */ @@ -429,7 +500,7 @@ public synchronized void refreshPre() { public synchronized void refreshPost() { // [] Remove invalid prediction data - if (hasStarted && !train.runtime.paused) { + if (/*TODO hasStarted && */!train.runtime.paused) { predictionsByIndex.keySet().retainAll(validPredictionEntries); measuredTransitTimes.keySet().retainAll(validPredictionEntries); transitTimeHistory.keySet().retainAll(validPredictionEntries); @@ -467,6 +538,13 @@ public synchronized void refreshPost() { initializationFinishTask = false; onInitialize(); } + + resetCaches(); + } + + private void resetCaches() { + isDelayedCache.clear(); + highestDeviationCache.clear(); } /** Called every tick */ @@ -668,5 +746,6 @@ protected void deserializeNbt(CompoundTag nbt) { public synchronized void shiftTime(long l) { this.destinationReachTime += l; predictionsByIndex.values().forEach(x -> x.shiftTime(l)); - } + } + } diff --git a/common/src/main/java/de/mrjulsen/crn/data/train/TrainListener.java b/common/src/main/java/de/mrjulsen/crn/data/train/TrainListener.java index 54da4195..efdf7881 100644 --- a/common/src/main/java/de/mrjulsen/crn/data/train/TrainListener.java +++ b/common/src/main/java/de/mrjulsen/crn/data/train/TrainListener.java @@ -3,15 +3,18 @@ import java.io.File; import java.io.IOException; import java.util.UUID; +import java.util.HashSet; +import java.util.Iterator; import java.util.Queue; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.TimeUnit; -import java.util.stream.Collectors; + import java.util.Set; import com.simibubi.create.content.trains.entity.Train; import de.mrjulsen.crn.CreateRailwaysNavigator; +import de.mrjulsen.crn.data.schedule.INavigationExtension; import de.mrjulsen.crn.data.storage.GlobalSettings; import de.mrjulsen.crn.event.CRNEventsManager; import de.mrjulsen.crn.event.ModCommonEvents; @@ -31,7 +34,7 @@ /** Monitors all trains in the world and processes their data and information to make it available for use. */ public final class TrainListener { - + private transient static final String FILENAME = CreateRailwaysNavigator.MOD_ID + "_train_data.nbt"; public static final ConcurrentHashMap data = new ConcurrentHashMap<>(); @@ -44,10 +47,14 @@ public final class TrainListener { public static void init() { // Register Event Listeners CRNEventsManager.getEvent(GlobalTrainDisplayDataRefreshEventPre.class).register(CreateRailwaysNavigator.MOD_ID, () -> { - queueTrainListenerTask(TrainListener::refreshPre); + queueTrainListenerTask(() -> { + StationDepartureHistory.cleanUpDepartureHistory(); + TrainListener.refreshPre(); + }); }); CRNEventsManager.getEvent(GlobalTrainDisplayDataRefreshEventPost.class).register(CreateRailwaysNavigator.MOD_ID, () -> { + TrainUtils.refreshCache(); queueTrainListenerTask(TrainListener::refreshPost); }); @@ -67,6 +74,11 @@ public static void init() { data.get(train.id).leaveDestination(); } } + + if (!isArrival && !((INavigationExtension)(Object)train.navigation).isDelayedWaitConditionPending()) { + // If not checking whether a delayed condition is pending, the train would block itself. + StationDepartureHistory.updateDepartureHistory(train, station.name); + } }); }); @@ -101,18 +113,30 @@ public static void init() { } public static Set getAllTrains() { - return data.values().stream().map(x -> x.getTrain()).collect(Collectors.toSet()); + Set result = new HashSet<>(data.size()); + for (TrainData v : data.values()) { + result.add(v.getTrain()); + } + return result; } public static boolean allTrainsInitialized() { - return data.values().stream().filter(x -> - !GlobalSettings.getInstance().isTrainBlacklisted(x.getTrain()) && - !x.getPredictionsRaw().isEmpty() && - !x.getTrain().runtime.paused && - !x.getTrain().derailed && - !x.getTrain().runtime.completed && - TrainUtils.isTrainValid(x.getTrain()) - ).allMatch(x -> x.isInitialized() && !x.isPreparing()); + for (TrainData data : data.values()) { + if (GlobalSettings.getInstance().isTrainBlacklisted(data.getTrain()) || + data.getPredictionsRaw().isEmpty() || + data.getTrain().runtime.paused || + data.getTrain().derailed || + data.getTrain().runtime.completed || + !TrainUtils.isTrainValid(data.getTrain()) + ) { + continue; + } + + if (!data.isInitialized() || data.isPreparing()) { + return false; + } + } + return true; } public static void start() { @@ -207,19 +231,29 @@ private static void queueTrainListenerTask(Runnable task) { public synchronized static void refreshPre() { if (!trainDataListenerActive) return; Set trains = TrainUtils.getTrains(true); - data.keySet().retainAll(trains.stream().filter(x -> !GlobalSettings.getInstance().isTrainBlacklisted(x)).map(x -> x.id).toList()); - trains.forEach(x -> { - data.computeIfAbsent(x.id, a -> TrainData.of(x)).refreshPre(); - }); + Iterator iterator = trains.iterator(); + while (iterator.hasNext()) { + Train train = iterator.next(); + if (GlobalSettings.getInstance().isTrainBlacklisted(train)) { + iterator.remove(); + data.remove(train.id); + continue; + } + data.computeIfAbsent(train.id, x -> TrainData.of(train)).refreshPre(); + } } public synchronized static void refreshPost() { if (!trainDataListenerActive) return; - data.values().forEach(x -> x.refreshPost()); + for (TrainData train : data.values()) { + train.refreshPost(); + } } public synchronized static void tick() { if (!trainDataListenerActive) return; - data.values().forEach(x -> x.tick()); + for (TrainData train : data.values()) { + train.tick(); + } } } diff --git a/common/src/main/java/de/mrjulsen/crn/data/train/TrainPrediction.java b/common/src/main/java/de/mrjulsen/crn/data/train/TrainPrediction.java index 5ebd35bb..d5edf1a1 100644 --- a/common/src/main/java/de/mrjulsen/crn/data/train/TrainPrediction.java +++ b/common/src/main/java/de/mrjulsen/crn/data/train/TrainPrediction.java @@ -75,6 +75,7 @@ public class TrainPrediction implements Comparable { TrainTravelSection section = getSection(); return section.isFinalStop(this); }); + private final Cache tagCache = new Cache<>(() -> GlobalSettings.getInstance().getOrCreateStationTagFor(stationName)); private final Cache section; private TrainPrediction(TrainData data, int entryIndex, String stationName, String title, int ticks, int stayDuration, int minStayDuration) { @@ -251,19 +252,19 @@ public long getBufferTimeLeft() { } public long getScheduledArrivalDay() { - return getScheduledArrivalTime() / DragonLib.TICKS_PER_DAY; + return getScheduledArrivalTime() / DragonLib.ticksPerDay(); } public long getScheduledDepartureDay() { - return getScheduledDepartureDay() / DragonLib.TICKS_PER_DAY; + return getScheduledDepartureDay() / DragonLib.ticksPerDay(); } public long getRealTimeArrivalDay() { - return getRealTimeArrivalTime() / DragonLib.TICKS_PER_DAY; + return getRealTimeArrivalTime() / DragonLib.ticksPerDay(); } public long getRealTimeDepartureDay() { - return getRealTimeDepartureTime() / DragonLib.TICKS_PER_DAY; + return getRealTimeDepartureTime() / DragonLib.ticksPerDay(); } public void setStopovers(List stopovers) { @@ -341,7 +342,7 @@ public StationTag getStationTag() throws RuntimeSideException { if (!ModCommonEvents.hasServer()) { throw new RuntimeSideException(false); } - return GlobalSettings.getInstance().getOrCreateStationTagFor(stationName); + return tagCache.get(); } public TrainTravelSection getSection() { @@ -392,6 +393,11 @@ public void updateRealTime(String stationName, int realTimeTicks) { } this.arrivalTicksCorrection += Math.min(tempArrivalCorrection, getArrivalTimeDeviation()); this.departureTicksCorrection += Math.min(tempDepartureCorrection, getArrivalTimeDeviation()); + resetAllTimedCaches(); + } + + private void resetAllTimedCaches() { + tagCache.clear(); } @Override @@ -427,7 +433,10 @@ public CompoundTag toNbt() { CompoundTag nbt = new CompoundTag(); ListTag stopovers = new ListTag(); - stopovers.addAll(this.stopovers.stream().map(x -> StringTag.valueOf(x)).toList()); + List stops = this.stopovers; + for (String s : stops) { + stopovers.add(StringTag.valueOf(s)); + } nbt.putInt(NBT_ENTRY_INDEX, entryIndex); nbt.putString(NBT_STATION_NAME, stationName == null ? "" : stationName); diff --git a/common/src/main/java/de/mrjulsen/crn/data/train/TrainStatus.java b/common/src/main/java/de/mrjulsen/crn/data/train/TrainStatus.java index 0c19d13d..935543ac 100644 --- a/common/src/main/java/de/mrjulsen/crn/data/train/TrainStatus.java +++ b/common/src/main/java/de/mrjulsen/crn/data/train/TrainStatus.java @@ -1,10 +1,13 @@ package de.mrjulsen.crn.data.train; +import java.util.ArrayList; import java.util.Arrays; +import java.util.Collection; import java.util.HashMap; +import java.util.List; import java.util.Map; -import java.util.function.Function; import java.util.function.Predicate; +import java.util.function.Supplier; import com.google.common.collect.ImmutableMap; @@ -12,41 +15,43 @@ import de.mrjulsen.crn.CreateRailwaysNavigator; import de.mrjulsen.crn.client.ClientWrapper; import de.mrjulsen.crn.client.gui.ModGuiIcons; +import de.mrjulsen.crn.client.lang.CustomLanguage; +import de.mrjulsen.crn.exceptions.RuntimeSideException; import de.mrjulsen.mcdragonlib.client.util.Graphics; import de.mrjulsen.mcdragonlib.client.util.GuiUtils; import de.mrjulsen.mcdragonlib.data.Single; -import de.mrjulsen.mcdragonlib.util.TextUtils; +import dev.architectury.platform.Platform; +import net.fabricmc.api.EnvType; import net.minecraft.ChatFormatting; import net.minecraft.client.gui.Font; -import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; import net.minecraft.resources.ResourceLocation; public class TrainStatus { - public static final MutableComponent textOperationalDisruption = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".delay_reason.operational_disruption"); // Betriebsstörung - public static final MutableComponent textTooFewTracks = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".delay_reason.too_few_tracks"); // Verfügbarkeit der Gleise eingeschränkt - public static final MutableComponent textOperationalStabilization = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".delay_reason.operational_stabilization"); // Betriebsstabilisierung - public static final MutableComponent textStaffShortage = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".delay_reason.staff_shortage"); // Kurzfristiger Personalausfall - public static final MutableComponent textTrackClosed = TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".delay_reason.track_closed"); + //public static final MutableComponent textOperationalDisruption = ELanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".delay_reason.operational_disruption"); // Betriebsstörung + //public static final MutableComponent textTooFewTracks = ELanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".delay_reason.too_few_tracks"); // Verfügbarkeit der Gleise eingeschränkt + //public static final MutableComponent textOperationalStabilization = ELanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".delay_reason.operational_stabilization"); // Betriebsstabilisierung + //public static final MutableComponent textStaffShortage = ELanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".delay_reason.staff_shortage"); // Kurzfristiger Personalausfall + //public static final MutableComponent textTrackClosed = ELanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".delay_reason.track_closed"); private static final Registry REGISTRY = Registry.create(CreateRailwaysNavigator.MOD_ID); - public static final TrainStatus DEFAULT_DELAY = REGISTRY.registerDefault("default_delay", new TrainStatus(TrainStatusCategory.TRAIN, TrainStatusType.DELAY, (data) -> TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".train_status.unknown_delay"), null)); - public static final TrainStatus DELAY_FROM_PREVIOUS_JOURNEY = REGISTRY.registerDefault("delay_from_previous_journey", new TrainStatus(TrainStatusCategory.TRAIN, TrainStatusType.DELAY, (data) -> TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".train_status.delay_previous_journey"), null)); - public static final TrainStatus CANCELLED = REGISTRY.registerDefault("cancelled", new TrainStatus(TrainStatusCategory.TRAIN, TrainStatusType.DELAY, (data) -> TextUtils.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".route_overview.cancelled"), null)); + public static final TrainStatus DEFAULT_DELAY = REGISTRY.registerDefault("default_delay", new TrainStatus(TrainStatusCategory.TRAIN, TrainStatusType.DELAY, () -> CustomLanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".train_status.unknown_delay"), null)); + public static final TrainStatus DELAY_FROM_PREVIOUS_JOURNEY = REGISTRY.registerDefault("delay_from_previous_journey", new TrainStatus(TrainStatusCategory.TRAIN, TrainStatusType.DELAY, () -> CustomLanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".train_status.delay_previous_journey"), null)); + public static final TrainStatus CANCELLED = REGISTRY.registerDefault("cancelled", new TrainStatus(TrainStatusCategory.TRAIN, TrainStatusType.DELAY, () -> CustomLanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".route_overview.cancelled"), null)); public static final int HEIGHT = 9; private final TrainStatusType importance; private final TrainStatusCategory category; - private final Function text; + private final Supplier text; //private final Function reason; private final Predicate trigger; private ResourceLocation location; - public TrainStatus(TrainStatusCategory category, TrainStatusType importance, Function text, /*Function reason,*/ Predicate trigger) { + public TrainStatus(TrainStatusCategory category, TrainStatusType importance, Supplier text, /*Function reason,*/ Predicate trigger) { this.importance = importance; this.category = category; this.text = text; @@ -58,8 +63,8 @@ public TrainStatusType getImportance() { return importance; } - public MutableComponent getText(TrainData data) { - return text.apply(data); + public MutableComponent getText() { + return text.get(); } /* @@ -72,8 +77,8 @@ public boolean isTriggerd(TrainData data) { return trigger != null && trigger.test(data); } - public CompiledTrainStatus compile(TrainData data) { - return new CompiledTrainStatus(category, importance, getText(data));//, getReason(data)); + public CompiledTrainStatus compile() { + return new CompiledTrainStatus(location, category, importance, getText());//, getReason(data)); } public ResourceLocation getLocation() { @@ -86,13 +91,14 @@ private void setLocation(ResourceLocation location) { } - public static record CompiledTrainStatus(TrainStatusCategory category, TrainStatusType type, Component text/*, Component reason*/) { + public static record CompiledTrainStatus(ResourceLocation id, TrainStatusCategory category, TrainStatusType type, Component text/*, Component reason*/) { public static final String NBT_CATEGORY = "Category"; public static final String NBT_TYPE = "Type"; public static final String NBT_TEXT = "Text"; public static final String NBT_REASON = "Reason"; + /* public CompoundTag toNbt() { CompoundTag nbt = new CompoundTag(); nbt.putByte(NBT_CATEGORY, category().getIndex()); @@ -110,6 +116,7 @@ public static CompiledTrainStatus fromNbt(CompoundTag nbt) { //TextUtils.text(nbt.getString(NBT_REASON)) ); } + */ public int render(Graphics graphics, Single font, int x, int y, int maxWidth) { final int color = type().getColor(); @@ -124,6 +131,26 @@ public int render(Graphics graphics, Single font, int x, int y, int maxWid return Math.max(HEIGHT, height + 2); } + + /** Client-side only! */ + public static List load(Collection ids) throws RuntimeSideException { + if (Platform.getEnv() == EnvType.SERVER) { + throw new RuntimeSideException(true); + } + List status = new ArrayList<>(ids.size()); + for (ResourceLocation loc : ids) { + status.add(TrainStatus.Registry.getRegisteredStatus().get(loc).compile()); + } + return status; + } + + /** Client-side only! */ + public static CompiledTrainStatus load(ResourceLocation id) throws RuntimeSideException { + if (Platform.getEnv() == EnvType.SERVER) { + throw new RuntimeSideException(true); + } + return TrainStatus.Registry.getRegisteredStatus().get(id).compile(); + } } diff --git a/common/src/main/java/de/mrjulsen/crn/data/train/TrainStop.java b/common/src/main/java/de/mrjulsen/crn/data/train/TrainStop.java index 907a6e9e..4b505894 100644 --- a/common/src/main/java/de/mrjulsen/crn/data/train/TrainStop.java +++ b/common/src/main/java/de/mrjulsen/crn/data/train/TrainStop.java @@ -312,19 +312,19 @@ public int getTicksUntilArrival() { } public long getScheduledArrivalDay() { - return getScheduledArrivalTime() / DragonLib.TICKS_PER_DAY; + return getScheduledArrivalTime() / DragonLib.ticksPerDay(); } public long getScheduledDepartureDay() { - return getScheduledDepartureDay() / DragonLib.TICKS_PER_DAY; + return getScheduledDepartureDay() / DragonLib.ticksPerDay(); } public long getRealTimeArrivalDay() { - return getRealTimeArrivalTime() / DragonLib.TICKS_PER_DAY; + return getRealTimeArrivalTime() / DragonLib.ticksPerDay(); } public long getRealTimeDepartureDay() { - return getRealTimeDepartureTime() / DragonLib.TICKS_PER_DAY; + return getRealTimeDepartureTime() / DragonLib.ticksPerDay(); } /** diff --git a/common/src/main/java/de/mrjulsen/crn/data/train/TrainTravelSection.java b/common/src/main/java/de/mrjulsen/crn/data/train/TrainTravelSection.java index 6c2a6f25..4fe2ec69 100644 --- a/common/src/main/java/de/mrjulsen/crn/data/train/TrainTravelSection.java +++ b/common/src/main/java/de/mrjulsen/crn/data/train/TrainTravelSection.java @@ -1,13 +1,13 @@ package de.mrjulsen.crn.data.train; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Optional; -import java.util.stream.Collectors; import de.mrjulsen.crn.CreateRailwaysNavigator; -import de.mrjulsen.crn.client.lang.ELanguage; +import de.mrjulsen.crn.client.lang.CustomLanguage; import de.mrjulsen.crn.data.StationTag; import de.mrjulsen.crn.data.TrainGroup; import de.mrjulsen.crn.data.TrainLine; @@ -28,6 +28,14 @@ public class TrainTravelSection { private final TrainLine trainLine; private final Cache> predictions = new Cache<>(() -> getPredictions(INVALID, false)); + private final Cache> stopoversCache = new Cache<>(() -> { + List predictions = this.predictions.get(); + List result = new ArrayList<>(predictions.size() - 2); + for (int i = 1; i < predictions.size() - 1; i++) { + result.add(predictions.get(i).getStationTag().getTagName().get()); + } + return result; + }); private final Cache nextSection; private final Cache previousSection; @@ -103,12 +111,12 @@ public boolean isUsable() { return usable; } - public TrainGroup getTrainGroup() { - return trainGroup; + public Optional getTrainGroup() { + return Optional.ofNullable(trainGroup); } - public TrainLine getTrainLine() { - return trainLine; + public Optional getTrainLine() { + return Optional.ofNullable(trainLine); } public TrainTravelSection nextSection() { @@ -130,7 +138,16 @@ public List getPredictions(int startingAtIndex, boolean ignoreI } List result = new ArrayList<>(); TrainTravelSection nextSection = nextSection(); - Map predictions = data.getPredictionsRaw().entrySet().stream().filter(x -> !GlobalSettings.getInstance().isStationBlacklisted(x.getValue().getStationName())).collect(Collectors.toMap(x -> x.getKey(), x -> x.getValue())); + + Map predictionsSrc = data.getPredictionsRaw(); + Map predictions = new HashMap<>(predictionsSrc.size()); + for (Map.Entry prediction : predictionsSrc.entrySet()) { + if (GlobalSettings.getInstance().isStationBlacklisted(prediction.getValue().getStationName())) { + continue; + } + predictions.put(prediction.getKey(), prediction.getValue()); + } + final int startIndex = getScheduleIndex(); final int stopIndex = nextSection.getScheduleIndex(); final int count = data.getTrain().runtime.getSchedule().entries.size(); @@ -155,7 +172,13 @@ public List getPredictions(int startingAtIndex, boolean ignoreI } public int getFirstIndexFor(StationTag tag) { - return getPredictions(INVALID, false).stream().filter(x -> x.getStationTag().equals(tag)).map(x -> x.getEntryIndex()).findFirst().orElse(0); + List predictions = getPredictions(INVALID, false); + for (TrainPrediction p : predictions) { + if (p.getStationTag().equals(tag)) { + return p.getEntryIndex(); + } + } + return 0; } /** @@ -186,8 +209,7 @@ public List getAllStops(long simulationTime, int currentIndex) { } public List getStopovers() { - List predictions = this.predictions.get(); - return predictions.stream().limit(predictions.size() - 1).skip(1).map(x -> x.getStationTag().getTagName().get()).toList(); /* TODO */ + return stopoversCache.get(); } public List getStopoversFrom(int startIndex) { @@ -240,13 +262,13 @@ public Optional getNextStop() { public String getDisplayText() { if (!isUsable()) { - return ELanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.not_in_service").getString(); + return CustomLanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.not_in_service").getString(); } return getFinalStop().map(x -> GlobalSettings.getInstance().getOrCreateStationTagFor(x.getStationName()).getTagName().get()).orElse("?"); } public String getDisplayTextStart() { - return !isUsable() ? ELanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.not_in_service").getString() : getFirstStop().map(x -> GlobalSettings.getInstance().getOrCreateStationTagFor(x.getStationName()).getTagName().get()).orElse("?"); + return !isUsable() ? CustomLanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.not_in_service").getString() : getFirstStop().map(x -> GlobalSettings.getInstance().getOrCreateStationTagFor(x.getStationName()).getTagName().get()).orElse("?"); } public String getStartStationName() { diff --git a/common/src/main/java/de/mrjulsen/crn/data/train/TrainUtils.java b/common/src/main/java/de/mrjulsen/crn/data/train/TrainUtils.java index a6936c5c..238a299b 100644 --- a/common/src/main/java/de/mrjulsen/crn/data/train/TrainUtils.java +++ b/common/src/main/java/de/mrjulsen/crn/data/train/TrainUtils.java @@ -2,17 +2,17 @@ import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Optional; import java.util.Set; import java.util.UUID; import java.util.function.Predicate; -import java.util.stream.Collectors; -import com.google.common.collect.ImmutableMap; import com.simibubi.create.Create; import com.simibubi.create.content.decoration.slidingDoor.DoorControlBehaviour; import com.simibubi.create.content.trains.GlobalRailwayManager; @@ -21,6 +21,7 @@ import com.simibubi.create.content.trains.entity.Train; import com.simibubi.create.content.trains.graph.EdgePointType; import com.simibubi.create.content.trains.graph.TrackEdge; +import com.simibubi.create.content.trains.graph.TrackGraph; import com.simibubi.create.content.trains.signal.SignalBoundary; import com.simibubi.create.content.trains.signal.TrackEdgePoint; import com.simibubi.create.content.trains.station.GlobalStation; @@ -33,6 +34,9 @@ import de.mrjulsen.crn.data.storage.GlobalSettings; import de.mrjulsen.crn.event.ModCommonEvents; import de.mrjulsen.crn.data.navigation.TrainSchedule; +import de.mrjulsen.mcdragonlib.config.ECachingPriority; +import de.mrjulsen.mcdragonlib.data.Cache; +import de.mrjulsen.mcdragonlib.data.MapCache; import de.mrjulsen.mcdragonlib.data.Single.MutableSingle; import de.mrjulsen.mcdragonlib.util.MathUtils; import net.minecraft.core.BlockPos; @@ -42,6 +46,82 @@ import net.minecraft.world.phys.Vec3; public final class TrainUtils { + + private static final Cache> allStationsCache = new Cache<>(() -> { + final Collection stations = new ArrayList<>(); + getRailwayManager().trackNetworks.forEach((uuid, graph) -> { + Collection foundStations = graph.getPoints(EdgePointType.STATION); + stations.addAll(foundStations); + }); + return stations; + }, ECachingPriority.LOWEST); + + private static final Cache> allSignalsCache = new Cache<>(() -> { + Set signals = new HashSet<>(); + for (TrackGraph graph : getRailwayManager().trackNetworks.values()) { + signals.addAll(graph.getPoints(EdgePointType.SIGNAL)); + } + return signals; + }, ECachingPriority.LOWEST); + + private static final MapCache, StationTag, StationTag> departingTrainsAtTagCache = new MapCache<>((station) -> { + Set trains = new HashSet<>(); + for (Map.Entry> e : GlobalTrainDisplayData.statusByDestination.entrySet()) { + if (!station.contains(e.getKey())) { + continue; + } + + for (TrainDeparturePrediction pred : e.getValue()) { + trains.add(pred.train); + } + } + return trains; + }, StationTag::hashCode, ECachingPriority.LOWEST); + + private static final MapCache, String, String> departingTrainsAtStationCache = new MapCache<>((station) -> { + Set trains = new HashSet<>(); + for (Map.Entry> e : GlobalTrainDisplayData.statusByDestination.entrySet()) { + if (!station.equals(e.getKey())) { + continue; + } + + for (TrainDeparturePrediction pred : e.getValue()) { + trains.add(pred.train); + } + } + return trains; + }, String::hashCode, ECachingPriority.LOWEST); + + private static record DeparturesFromTagContext(StationTag station, UUID selfTrain) { + @Override + public final int hashCode() { + return Objects.hash(station, selfTrain); + } + } + private static final MapCache, DeparturesFromTagContext, DeparturesFromTagContext> departuresAtTagCache = new MapCache<>((context) -> { + return getDeparturesAt(x -> x.getStationTag().equals(context.station()), context.selfTrain()); + }, DeparturesFromTagContext::hashCode, ECachingPriority.LOWEST); + + private static record DeparturesFromStationContext(String station, UUID selfTrain) { + @Override + public final int hashCode() { + return Objects.hash(station, selfTrain); + } + } + private static final MapCache, DeparturesFromStationContext, DeparturesFromStationContext> departuresAtStationCache = new MapCache<>((context) -> { + return getDeparturesAt(x -> TrainUtils.stationMatches(x.getStationName(), context.station()), context.selfTrain()); + }, DeparturesFromStationContext::hashCode, ECachingPriority.LOWEST); + + public static void refreshCache() { + allStationsCache.clear(); + allSignalsCache.clear(); + departingTrainsAtTagCache.clearAll(); + departingTrainsAtStationCache.clearAll(); + departuresAtTagCache.clearAll(); + departuresAtStationCache.clearAll(); + } + + private TrainUtils() {} public static GlobalRailwayManager getRailwayManager() { return Create.RAILWAYS; @@ -56,7 +136,12 @@ public static Map> allPredictionsRa } public static boolean isStationKnown(String station) { - return allPredictionsRaw().keySet().stream().anyMatch(x -> TrainUtils.stationMatches(station, x)); + for (String stationKey : allPredictionsRaw().keySet()) { + if (TrainUtils.stationMatches(station, stationKey)) { + return true; + } + } + return false; } /** @@ -64,12 +149,7 @@ public static boolean isStationKnown(String station) { * @return a list containing all track stations. */ public static Collection getAllStations() { - final Collection stations = new ArrayList<>(); - getRailwayManager().trackNetworks.forEach((uuid, graph) -> { - Collection foundStations = graph.getPoints(EdgePointType.STATION); - stations.addAll(foundStations); - }); - return stations; + return allStationsCache.get(); } public static Optional getTrain(UUID trainId) { @@ -81,27 +161,37 @@ public static Set getTrainIds() { } public static Set getTrains(boolean onlyValid) { - return new HashSet<>(getRailwayManager().trains.values().stream().filter(x -> !onlyValid || isTrainValid(x)).toList()); + Set trains = new HashSet<>(); + for (Train train : getRailwayManager().trains.values()) { + if (onlyValid && !isTrainValid(train)) { + continue; + } + trains.add(train); + } + return trains; } - public static Set getAllSignals() { - return new HashSet<>(getRailwayManager().trackNetworks.values().stream().flatMap(x -> x.getPoints(EdgePointType.SIGNAL).stream()).toList()); + public static Set getAllSignals() { + return allSignalsCache.get(); } public static Set getDepartingTrainsAt(StationTag station) { - return ImmutableMap.copyOf(GlobalTrainDisplayData.statusByDestination).entrySet().stream().filter(x -> station.contains(x.getKey())).flatMap(x -> x.getValue().stream()).map(x -> x.train).collect(Collectors.toSet()); + return departingTrainsAtTagCache.get(station, station); } public static Set getDepartingTrainsAt(String station) { - return ImmutableMap.copyOf(GlobalTrainDisplayData.statusByDestination).entrySet().stream().filter(x -> station.equals(x.getKey())).flatMap(x -> x.getValue().stream()).map(x -> x.train).collect(Collectors.toSet()); + return departingTrainsAtStationCache.get(station, station); } + public static List getDeparturesAt(StationTag station, UUID selfTrain) { - return getDeparturesAt(x -> x.getStationTag().equals(station), selfTrain); + DeparturesFromTagContext context = new DeparturesFromTagContext(station, selfTrain); + return departuresAtTagCache.get(context, context); } public static List getDeparturesAtStationName(String stationName, UUID selfTrain) { - return getDeparturesAt(x -> TrainUtils.stationMatches(x.getStationName(), stationName), selfTrain); + DeparturesFromStationContext context = new DeparturesFromStationContext(stationName, selfTrain); + return departuresAtStationCache.get(context, context); } public static List getDeparturesAt(Predicate stationFilter, UUID selfTrain) { @@ -111,28 +201,39 @@ public static List getDeparturesAt(Predicate station selfSchedule.setFirst(new TrainSchedule(TrainListener.data.containsKey(x.id) ? TrainListener.data.get(x.id).getSessionId() : new UUID(0, 0), x)); }); - List list = TrainListener.data.values().stream() - .filter(x -> !x.getTrainId().equals(selfTrain) && TrainUtils.isTrainUsable(x.getTrain())) - .flatMap(x -> x.getPredictions().stream().filter(stationFilter)) - .map(TrainStop::new) - .filter(x -> { - if (selfSchedule.getFirst() != null) { - return true; + List stops = new ArrayList<>(); + for (TrainData data : TrainListener.data.values()) { + + if (data.getTrainId().equals(selfTrain) || !TrainUtils.isTrainUsable(data.getTrain())) { + continue; + } + + for (TrainPrediction pred : data.getPredictions()) { + if (!stationFilter.test(pred)) { + continue; + } + + TrainStop stop = new TrainStop(pred); + if (selfSchedule.getFirst() == null) { + Optional train = TrainUtils.getTrain(stop.getTrainId()); + if (!train.isPresent()) { + continue; + } + TrainSchedule sched = new TrainSchedule(TrainListener.data.containsKey(train.get().id) ? TrainListener.data.get(train.get().id).getSessionId() : new UUID(0, 0), train.get()); + if (sched.isEqual(selfSchedule.getFirst())) { + continue; + } } - Optional train = TrainUtils.getTrain(x.getTrainId()); - if (!train.isPresent()) { - return false; - } - TrainSchedule sched = new TrainSchedule(TrainListener.data.containsKey(train.get().id) ? TrainListener.data.get(train.get().id).getSessionId() : new UUID(0, 0), train.get()); - return !sched.isEqual(selfSchedule.getFirst()); - }) - .sorted((a, b) -> Long.compare(a.getScheduledDepartureTime(), b.getScheduledDepartureTime())) - .toList(); + stops.add(stop); + } + + Collections.sort(stops, (a, b) -> Long.compare(a.getScheduledDepartureTime(), b.getScheduledDepartureTime())); + } List results = new ArrayList<>(); Set usedTrains = new HashSet<>(); usedTrains.add(selfTrain); - for (TrainStop stop : list) { + for (TrainStop stop : stops) { if (!TrainListener.data.containsKey(stop.getTrainId())) continue; TrainData data = TrainListener.data.get(stop.getTrainId()); TrainTravelSection section = data.getSectionByIndex(stop.getSectionIndex()); @@ -150,12 +251,38 @@ public static List getDeparturesAt(Predicate station } public static Set isSignalOccupied(UUID signalId, Set excludedTrains) { - Optional signal = getAllSignals().stream().filter(x -> x.getId().equals(signalId)).findFirst(); + Optional signal = Optional.empty(); + for (SignalBoundary s : getAllSignals()) { + if (s.getId().equals(signalId)) { + signal = Optional.of(s); + break; + } + } if (!signal.isPresent()) { return Set.of(); } - Set occupyingTrains = getTrains(false).stream().filter(x -> !excludedTrains.contains(x.id) && x.occupiedSignalBlocks.keySet().stream().anyMatch(y -> y.equals(signal.get().groups.getFirst()) || y.equals(signal.get().groups.getSecond()))).collect(Collectors.toSet()); + Set occupyingTrains = new HashSet<>(); + for (Train train : getTrains(false)) { + if (excludedTrains.contains(train.id)) { + continue; + } + + boolean isOccupyingSignal = false; + for (UUID occupiedSignal : train.occupiedSignalBlocks.keySet()) { + if (occupiedSignal.equals(signal.get().groups.getFirst()) || occupiedSignal.equals(signal.get().groups.getSecond())) { + isOccupyingSignal = true; + break; + } + } + + if (!isOccupyingSignal) { + continue; + } + + occupyingTrains.add(train); + } + return occupyingTrains; } diff --git a/common/src/main/java/de/mrjulsen/crn/data/train/portable/BasicTrainDisplayData.java b/common/src/main/java/de/mrjulsen/crn/data/train/portable/BasicTrainDisplayData.java index 862b2af4..d1b2d536 100644 --- a/common/src/main/java/de/mrjulsen/crn/data/train/portable/BasicTrainDisplayData.java +++ b/common/src/main/java/de/mrjulsen/crn/data/train/portable/BasicTrainDisplayData.java @@ -1,6 +1,7 @@ package de.mrjulsen.crn.data.train.portable; import java.util.ArrayList; +import java.util.Collection; import java.util.List; import java.util.Objects; import java.util.UUID; @@ -8,6 +9,7 @@ import com.simibubi.create.content.trains.entity.TrainIconType; import de.mrjulsen.crn.exceptions.RuntimeSideException; +import de.mrjulsen.mcdragonlib.data.Cache; import de.mrjulsen.crn.data.train.TrainData; import de.mrjulsen.crn.data.train.TrainListener; import de.mrjulsen.crn.data.train.TrainStop; @@ -15,6 +17,7 @@ import de.mrjulsen.crn.event.ModCommonEvents; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; +import net.minecraft.nbt.StringTag; import net.minecraft.nbt.Tag; import net.minecraft.resources.ResourceLocation; @@ -22,32 +25,42 @@ public class BasicTrainDisplayData { private final UUID id; private final String name; + private final int color; private final TrainIconType icon; - private final List status; + private final Collection statusLocations; // Server private final boolean cancelled; + private final Cache> clientStatus; + private static final String NBT_ID = "Id"; private static final String NBT_NAME = "Name"; private static final String NBT_ICON = "Icon"; + private static final String NBT_COLOR = "Color"; private static final String NBT_STATUS = "Status"; private static final String NBT_CANCELLED = "Cancelled"; - public BasicTrainDisplayData( + private BasicTrainDisplayData( UUID id, String name, + int color, TrainIconType icon, - List status, + Collection statusLocations, boolean cancelled ) { this.id = id; this.name = name; + this.color = color; this.icon = icon; - this.status = status; + this.statusLocations = statusLocations; this.cancelled = cancelled; + + this.clientStatus = new Cache<>(() -> { + return CompiledTrainStatus.load(statusLocations); + }); } public static BasicTrainDisplayData empty() { - return new BasicTrainDisplayData(new UUID(0, 0), "", TrainIconType.getDefault(), List.of(), true); + return new BasicTrainDisplayData(new UUID(0, 0), "", 0, TrainIconType.getDefault(), List.of(), true); } /** Server-side only! */ @@ -61,13 +74,15 @@ public static BasicTrainDisplayData of(UUID train) throws RuntimeSideException { TrainData data = TrainListener.data.get(train); return new BasicTrainDisplayData( data.getTrainId(), - data.getTrainName(), - TrainIconType.getDefault(), // TODO + data.getTrainDisplayName(), + data.getCurrentSection().getTrainLine().map(x -> x.getColor()).orElse(0), + data.getTrain().icon, new ArrayList<>(data.getStatus()), data.isCancelled() ); } + /** Server-side only! */ public static BasicTrainDisplayData of(TrainStop stop) throws RuntimeSideException { if (!ModCommonEvents.hasServer()) { throw new RuntimeSideException(false); @@ -78,7 +93,8 @@ public static BasicTrainDisplayData of(TrainStop stop) throws RuntimeSideExcepti TrainData data = TrainListener.data.get(stop.getTrainId()); return new BasicTrainDisplayData( stop.getTrainId(), - stop.getTrainName(), + stop.getTrainDisplayName(), + data.getSectionForIndex(stop.getScheduleIndex()).getTrainLine().map(x -> x.getColor()).orElse(0), stop.getTrainIcon(), new ArrayList<>(data.getStatus()), data.isCancelled() @@ -98,25 +114,37 @@ public TrainIconType getIcon() { } public List getStatus() { - return status; + return clientStatus.get(); } public boolean isCancelled() { return cancelled; } + public int getColor() { + return color; + } + + public boolean hasColor() { + return color != 0; + } + public boolean hasStatusInfo() { return !getStatus().isEmpty(); } + public CompoundTag toNbt() { CompoundTag nbt = new CompoundTag(); ListTag statusList = new ListTag(); - statusList.addAll(status.stream().map(x -> x.toNbt()).toList()); + for (ResourceLocation s : statusLocations) { + statusList.add(StringTag.valueOf(s.toString())); + } nbt.putUUID(NBT_ID, id); nbt.putString(NBT_NAME, name); nbt.putString(NBT_ICON, icon.getId().toString()); + nbt.putInt(NBT_COLOR, color); nbt.put(NBT_STATUS, statusList); nbt.putBoolean(NBT_CANCELLED, cancelled); return nbt; @@ -125,9 +153,10 @@ public CompoundTag toNbt() { public static BasicTrainDisplayData fromNbt(CompoundTag nbt) { return new BasicTrainDisplayData( nbt.getUUID(NBT_ID), - nbt.getString(NBT_NAME), + nbt.getString(NBT_NAME), + nbt.getInt(NBT_COLOR), TrainIconType.byId(new ResourceLocation(nbt.getString(NBT_ICON))), - nbt.getList(NBT_STATUS, Tag.TAG_COMPOUND).stream().map(x -> CompiledTrainStatus.fromNbt(((CompoundTag)x))).toList(), + nbt.getList(NBT_STATUS, Tag.TAG_STRING).stream().map(x -> new ResourceLocation(((StringTag)x).getAsString())).toList(), nbt.getBoolean(NBT_CANCELLED) ); } diff --git a/common/src/main/java/de/mrjulsen/crn/data/train/portable/NextConnectionsDisplayData.java b/common/src/main/java/de/mrjulsen/crn/data/train/portable/NextConnectionsDisplayData.java index 641bacd6..5a74d2b9 100644 --- a/common/src/main/java/de/mrjulsen/crn/data/train/portable/NextConnectionsDisplayData.java +++ b/common/src/main/java/de/mrjulsen/crn/data/train/portable/NextConnectionsDisplayData.java @@ -1,11 +1,13 @@ package de.mrjulsen.crn.data.train.portable; +import java.util.ArrayList; import java.util.List; import java.util.UUID; import de.mrjulsen.crn.data.TagName; import de.mrjulsen.crn.data.storage.GlobalSettings; import de.mrjulsen.crn.exceptions.RuntimeSideException; +import de.mrjulsen.crn.data.train.TrainStop; import de.mrjulsen.crn.data.train.TrainUtils; import de.mrjulsen.crn.event.ModCommonEvents; import net.minecraft.nbt.CompoundTag; @@ -33,9 +35,15 @@ public static NextConnectionsDisplayData at(String stationName, UUID selfTrainId if (!ModCommonEvents.hasServer()) { throw new RuntimeSideException(false); } + + List departures = TrainUtils.getDeparturesAt(GlobalSettings.getInstance().getOrCreateStationTagFor(TagName.of(stationName)), selfTrainId); + List displayData = new ArrayList<>(departures.size()); + for (TrainStop stop : departures) { + displayData.add(TrainStopDisplayData.of(stop)); + } return new NextConnectionsDisplayData( - TrainUtils.getDeparturesAt(GlobalSettings.getInstance().getOrCreateStationTagFor(TagName.of(stationName)), selfTrainId).stream().map(x -> TrainStopDisplayData.of(x)).toList() + displayData ); } public List getConnections() { @@ -46,7 +54,10 @@ public CompoundTag toNbt() { CompoundTag nbt = new CompoundTag(); ListTag list = new ListTag(); - list.addAll(stops.stream().map(x -> x.toNbt()).toList()); + List displayData = stops; + for (TrainStopDisplayData d : displayData) { + list.add(d.toNbt()); + } nbt.put(NBT_STOPS, list); return nbt; diff --git a/common/src/main/java/de/mrjulsen/crn/data/train/portable/StationDisplayData.java b/common/src/main/java/de/mrjulsen/crn/data/train/portable/StationDisplayData.java index dece556a..16a30124 100644 --- a/common/src/main/java/de/mrjulsen/crn/data/train/portable/StationDisplayData.java +++ b/common/src/main/java/de/mrjulsen/crn/data/train/portable/StationDisplayData.java @@ -19,6 +19,7 @@ public class StationDisplayData { private final TrainStopDisplayData stationData; private final String firstStopName; private final boolean isLastStop; + private final boolean isNextSectionExcluded; private final List stopovers; private static final String NBT_TRAIN = "Train"; @@ -26,6 +27,7 @@ public class StationDisplayData { private static final String NBT_STOPOVERS = "Stopovers"; private static final String NBT_FIRST_STOP = "FirstStop"; private static final String NBT_IS_LAST = "IsLast"; + private static final String NBT_IS_NEXT_EXCLUDED = "IsNextSectionExcluded"; @@ -34,6 +36,7 @@ public StationDisplayData( TrainStopDisplayData stationData, String firstStopName, boolean isLastStop, + boolean isNextSectionExcluded, List stopovers ) { this.trainData = trainData; @@ -41,10 +44,11 @@ public StationDisplayData( this.stopovers = stopovers; this.firstStopName = firstStopName; this.isLastStop = isLastStop; + this.isNextSectionExcluded = isNextSectionExcluded; } public static StationDisplayData empty() { - return new StationDisplayData(BasicTrainDisplayData.empty(), TrainStopDisplayData.empty(), "", false, List.of()); + return new StationDisplayData(BasicTrainDisplayData.empty(), TrainStopDisplayData.empty(), "", false, false, List.of()); } /** Server-side only! */ @@ -76,6 +80,7 @@ public static StationDisplayData of(TrainStop stop) throws RuntimeSideException TrainStopDisplayData.of(stop), firstStop, isLastStopOfSection, + isLastStopOfSection && !section.nextSection().isUsable(), section.getStopoversFrom(stop.getScheduleIndex()) ); } @@ -100,6 +105,10 @@ public boolean isLastStop() { return isLastStop; } + public boolean isNextSectionExcluded() { + return isNextSectionExcluded; + } + public boolean isDelayed() { return isLastStop() ? getStationData().isArrivalDelayed() : getStationData().isDepartureDelayed(); } @@ -117,12 +126,16 @@ public CompoundTag toNbt() { CompoundTag nbt = new CompoundTag(); ListTag stopoversList = new ListTag(); - stopoversList.addAll(getStopovers().stream().map(x -> StringTag.valueOf(x)).toList()); + List stations = getStopovers(); + for (String name : stations) { + stopoversList.add(StringTag.valueOf(name)); + } nbt.put(NBT_TRAIN, trainData.toNbt()); nbt.put(NBT_STATION, stationData.toNbt()); nbt.putString(NBT_FIRST_STOP, firstStopName); nbt.putBoolean(NBT_IS_LAST, isLastStop); + nbt.putBoolean(NBT_IS_NEXT_EXCLUDED, isNextSectionExcluded); nbt.put(NBT_STOPOVERS, stopoversList); return nbt; } @@ -133,6 +146,7 @@ public static StationDisplayData fromNbt(CompoundTag nbt) { TrainStopDisplayData.fromNbt(nbt.getCompound(NBT_STATION)), nbt.getString(NBT_FIRST_STOP), nbt.getBoolean(NBT_IS_LAST), + nbt.getBoolean(NBT_IS_NEXT_EXCLUDED), nbt.getList(NBT_STOPOVERS, Tag.TAG_STRING).stream().map(x -> ((StringTag)x).getAsString()).toList() ); } diff --git a/common/src/main/java/de/mrjulsen/crn/data/train/portable/TrainDisplayData.java b/common/src/main/java/de/mrjulsen/crn/data/train/portable/TrainDisplayData.java index f26a097d..848e1514 100644 --- a/common/src/main/java/de/mrjulsen/crn/data/train/portable/TrainDisplayData.java +++ b/common/src/main/java/de/mrjulsen/crn/data/train/portable/TrainDisplayData.java @@ -11,6 +11,7 @@ import de.mrjulsen.crn.exceptions.RuntimeSideException; import de.mrjulsen.crn.data.train.TrainData; import de.mrjulsen.crn.data.train.TrainListener; +import de.mrjulsen.crn.data.train.TrainPrediction; import de.mrjulsen.crn.data.train.TrainStop; import de.mrjulsen.crn.data.train.TrainTravelSection; import de.mrjulsen.crn.data.train.TrainUtils; @@ -112,9 +113,18 @@ public static TrainDisplayData of(Train train) throws RuntimeSideException { TrainData data = TrainListener.data.get(train.id); TrainTravelSection section = data.getCurrentSection(); + + List displayData = new ArrayList<>(); + if (section.isUsable()) { + List predictions = data.getCurrentSection().getPredictions(-1, false); + for (TrainPrediction prediction : predictions) { + displayData.add(TrainStopDisplayData.of(new TrainStop(prediction))); + } + } + return new TrainDisplayData( BasicTrainDisplayData.of(train.id), - section.isUsable() ? data.getCurrentSection().getPredictions(-1, false).stream().map(x -> TrainStopDisplayData.of(new TrainStop(x))).toList() : List.of(), + displayData, data.getCurrentScheduleIndex(), side, train.speed, @@ -177,7 +187,10 @@ public CompoundTag toNbt() { CompoundTag nbt = new CompoundTag(); ListTag stopsList = new ListTag(); - stopsList.addAll(getAllStops().stream().map(x -> x.toNbt()).toList()); + List allStops = getAllStops(); + for (TrainStopDisplayData stop : allStops) { + stopsList.add(stop.toNbt()); + } nbt.put(NBT_TRAIN, trainData.toNbt()); nbt.put(NBT_STOPS, stopsList); diff --git a/common/src/main/java/de/mrjulsen/crn/data/train/portable/TrainStopDisplayData.java b/common/src/main/java/de/mrjulsen/crn/data/train/portable/TrainStopDisplayData.java index 7414ba06..0a440247 100644 --- a/common/src/main/java/de/mrjulsen/crn/data/train/portable/TrainStopDisplayData.java +++ b/common/src/main/java/de/mrjulsen/crn/data/train/portable/TrainStopDisplayData.java @@ -68,8 +68,8 @@ public static TrainStopDisplayData of(TrainStop stop) throws RuntimeSideExceptio stop.getScheduledArrivalTime(), stop.getRealTimeDepartureTime(), stop.getRealTimeArrivalTime(), - stop.getDisplayTitle(),//stop.getRealTimeStationTag().stationName(), - stop.getTrainName(), + stop.getDisplayTitle(), + stop.getTrainDisplayName(), stop.getRealTimeStationTag().info() ); } diff --git a/common/src/main/java/de/mrjulsen/crn/debug/DebugOverlay.java b/common/src/main/java/de/mrjulsen/crn/debug/DebugOverlay.java index a46bebf8..edb81867 100644 --- a/common/src/main/java/de/mrjulsen/crn/debug/DebugOverlay.java +++ b/common/src/main/java/de/mrjulsen/crn/debug/DebugOverlay.java @@ -49,7 +49,7 @@ public void render(Graphics graphics, float partialTicks, int screenWidth, int s trainIndex %= TrainListener.data.size(); TrainData data = TrainListener.data.values().stream().skip(trainIndex).findFirst().get(); drawLine(graphics, data.getTrain().name.getString() + " (" + (data.isPreparing() ? "PREPARING" : (data.isInitialized() ? "READY" : "INITIALIZING")) + ") SessionId: " + data.getSessionId()); - drawLine(graphics, "Display: " + data.getCurrentTravelSection().getDisplayText() + ", Title: " + data.getCurrentTitle() + ", IsDynamic: " + data.isDynamic()); + drawLine(graphics, "Display: " + data.getCurrentSection().getDisplayText() + ", Title: " + data.getCurrentTitle() + ", IsDynamic: " + data.isDynamic()); drawLine(graphics, "Track: " + !((TrainStatusAccessor)data.getTrain().status).crn$track() + ", Conductor: " + !((TrainStatusAccessor)data.getTrain().status).crn$conductor() + ", Navigation: " + !((TrainStatusAccessor)data.getTrain().status).crn$navigation() + ", Paused: " + data.getTrain().runtime.paused + ", Auto: " + data.getTrain().runtime.isAutoSchedule + ", Manual: " + data.isManualControlled + ", Cancelled: " + data.isCancelled()); drawLine(graphics, "Duration: " + data.getTotalDuration() + ", Ticks: " + data.getTransitTicks() + "/" + data.waitingAtStationTicks() + "/" + data.waitingForSignalTicks + ", Dest: " + (data.getTrain().navigation.destination == null ? "(at station)" : (data.getTrain().navigation.destination.name + ", DestID: " + data.getTrain().navigation.destination.id)) + ", Delay: " + data.getHighestDeviation() + " (-" + data.getDeviationDelayOffset() + "), Status: " + data.debug_statusInfoCount()); data.getPredictions().forEach(a -> { @@ -87,7 +87,7 @@ public void render(Graphics graphics, float partialTicks, int screenWidth, int s drawLine(graphics, "Sections:"); for (TrainTravelSection section : data.getSections()) { - drawLine(graphics, " - [ " + section.getScheduleIndex() + " ]: " + section.getDisplayText() + " (" + section.getStartStationName() + " -> " + section.getDestinationStationName() + "), Group: " + (section.getTrainGroup() == null ? "none" : section.getTrainGroup().getGroupName()) + ", Line: " + (section.getTrainLine() == null ? "none" : section.getTrainLine().getLineName()) + ", Include: " + section.shouldIncludeNextStationOfNextSection() + ", Navigable: " + section.isUsable() + ", Next: " + section.nextSection().getScheduleIndex()); + drawLine(graphics, " - [ " + section.getScheduleIndex() + " ]: " + section.getDisplayText() + " (" + section.getStartStationName() + " -> " + section.getDestinationStationName() + "), Group: " + section.getTrainGroup().map(x -> x.getGroupName()).orElse("none") + ", Line: " + section.getTrainLine().map(x -> x.getLineName()).orElse("none") + ", Include: " + section.shouldIncludeNextStationOfNextSection() + ", Navigable: " + section.isUsable() + ", Next: " + section.nextSection().getScheduleIndex()); } } drawLine(graphics, TextUtils.text("Press K to switch train.").withStyle(ChatFormatting.AQUA)); diff --git a/common/src/main/java/de/mrjulsen/crn/event/ModClientEvents.java b/common/src/main/java/de/mrjulsen/crn/event/ModClientEvents.java index 40c6c06d..197d97af 100644 --- a/common/src/main/java/de/mrjulsen/crn/event/ModClientEvents.java +++ b/common/src/main/java/de/mrjulsen/crn/event/ModClientEvents.java @@ -2,9 +2,12 @@ import de.mrjulsen.crn.CreateRailwaysNavigator; import de.mrjulsen.crn.client.ClientWrapper; +import de.mrjulsen.crn.client.input.ModKeys; import de.mrjulsen.crn.config.ModClientConfig; +import de.mrjulsen.crn.config.ModCommonConfig; import de.mrjulsen.crn.data.SavedRoutesManager; import de.mrjulsen.crn.data.navigation.ClientTrainListener; +import de.mrjulsen.crn.data.train.StationDepartureHistory; import de.mrjulsen.crn.event.events.DefaultTrainDataRefreshEvent; import de.mrjulsen.crn.event.events.RouteDetailsActionsEvent; import de.mrjulsen.crn.network.InstanceManager; @@ -27,6 +30,7 @@ public class ModClientEvents { public static void init() { ClientLifecycleEvent.CLIENT_SETUP.register((mc) -> { + ModKeys.init(); ModDisplayTags.register(); }); @@ -76,9 +80,12 @@ public static void init() { }); ClientGuiEvent.DEBUG_TEXT_LEFT.register((texts) -> { - texts.add(String.format("CRN | RL: %s", - ClientTrainListener.debug_registeredListenersCount() - )); + if (ModCommonConfig.ADVANCED_LOGGING.get()) { + texts.add(String.format("CRN | RL: %s, %s", + ClientTrainListener.debug_registeredListenersCount(), + StationDepartureHistory.debug_departureHistory() + )); + } }); } } diff --git a/common/src/main/java/de/mrjulsen/crn/event/ModCommonEvents.java b/common/src/main/java/de/mrjulsen/crn/event/ModCommonEvents.java index 992c9244..f2f89b0e 100644 --- a/common/src/main/java/de/mrjulsen/crn/event/ModCommonEvents.java +++ b/common/src/main/java/de/mrjulsen/crn/event/ModCommonEvents.java @@ -5,7 +5,10 @@ import de.mrjulsen.crn.CreateRailwaysNavigator; import de.mrjulsen.crn.block.display.AdvancedDisplayTarget; import de.mrjulsen.crn.cmd.DebugCommand; +import de.mrjulsen.crn.config.ModCommonConfig; import de.mrjulsen.crn.data.storage.GlobalSettings; +import de.mrjulsen.crn.data.train.StationDepartureHistory; +import de.mrjulsen.crn.data.train.TrainData; import de.mrjulsen.crn.data.train.TrainListener; import de.mrjulsen.crn.event.events.CreateTrainPredictionEvent; import de.mrjulsen.crn.event.events.GlobalTrainDisplayDataRefreshEventPost; @@ -16,7 +19,6 @@ import de.mrjulsen.crn.event.events.TrainArrivalAndDepartureEvent; import de.mrjulsen.crn.event.events.TrainDestinationChangedEvent; import de.mrjulsen.crn.registry.ModExtras; -import de.mrjulsen.crn.web.SimpleWebServer; import de.mrjulsen.mcdragonlib.internal.ClientWrapper; import dev.architectury.event.events.common.CommandRegistrationEvent; import dev.architectury.event.events.common.LifecycleEvent; @@ -56,12 +58,6 @@ public static void init() { TrainListener.start(); AdvancedDisplayTarget.start(); - - try { - SimpleWebServer.start(); - } catch (Exception e) { - e.printStackTrace(); - } }); LifecycleEvent.SERVER_STOPPING.register((server) -> { @@ -70,8 +66,7 @@ public static void init() { TrainListener.stop(); AdvancedDisplayTarget.stop(); CRNEventsManager.clearEvents(); - - SimpleWebServer.stop(); + StationDepartureHistory.clearAll(); }); LifecycleEvent.SERVER_STOPPED.register((server) -> { @@ -86,8 +81,10 @@ public static void init() { long currentTicks = ModCommonEvents.getPhysicalLevel().dayTime(); long diff = currentTicks - lastTicks; if (Math.abs(diff) > 1) { - TrainListener.data.values().forEach(x -> x.shiftTime(diff)); - CreateRailwaysNavigator.LOGGER.info("All times have been corrected: " + (diff) + " Ticks"); + for (TrainData data : TrainListener.data.values()) { + data.shiftTime(diff); + } + if (ModCommonConfig.ADVANCED_LOGGING.get()) CreateRailwaysNavigator.LOGGER.info("All times have been corrected: " + (diff) + " Ticks"); } lastTicks = currentTicks; } @@ -95,11 +92,14 @@ public static void init() { TrainListener.tick(); }); - CommandRegistrationEvent.EVENT.register((dispatcher, buildContext, selection) -> { + CommandRegistrationEvent.EVENT.register((dispatcher, context, selection) -> { DebugCommand.register(dispatcher, selection); }); LifecycleEvent.SERVER_LEVEL_SAVE.register((server) -> { + if (!getCurrentServer().isPresent()) return; + if (server != getCurrentServer().get().overworld()) return; + TrainListener.save(); if (GlobalSettings.hasInstance()) GlobalSettings.getInstance().save(); }); diff --git a/common/src/main/java/de/mrjulsen/crn/item/NavigatorItem.java b/common/src/main/java/de/mrjulsen/crn/item/NavigatorItem.java index 01c7c2f9..08c7aee0 100644 --- a/common/src/main/java/de/mrjulsen/crn/item/NavigatorItem.java +++ b/common/src/main/java/de/mrjulsen/crn/item/NavigatorItem.java @@ -22,4 +22,27 @@ public InteractionResultHolder use(Level pLevel, Player pPlayer, Inte } return super.use(pLevel, pPlayer, pUsedHand); } + + /* + @Environment(EnvType.CLIENT) + @SuppressWarnings("resource") + @Override + public void renderAdditional(RenderGraphics graphics, ItemStack itemStack, TransformType transformType, boolean leftHand, PoseStack poseStack, MultiBufferSource buffer, int combinedLight, int combinedOverlay, BakedModel model) { + Font font = Minecraft.getInstance().font; + poseStack.mulPose(Vector3f.XP.rotationDegrees(90F)); + poseStack.translate(4, 2, -0.76); + + poseStack.pushPose(); + poseStack.translate(4, 0.8f, 0); + poseStack.scale(0.075f, 0.075f, 0.075f); + BERUtils.drawString(graphics, font, 0, 0, "Day " + (DragonLib.getCurrentWorldTime() / DragonLib.ticksPerDay()), 0xFFFFFFFF, EAlignment.CENTER, false, LightTexture.FULL_BRIGHT); + poseStack.popPose(); + + poseStack.pushPose(); + poseStack.translate(4, 2, 0); + poseStack.scale(0.2f, 0.2f, 0.2f); + BERUtils.drawString(graphics, font, 0, 0, TimeUtils.formatTime(DragonLib.getCurrentWorldTime(), ModClientConfig.TIME_FORMAT.get()), 0xFFFFFFFF, EAlignment.CENTER, false, LightTexture.FULL_BRIGHT); + poseStack.popPose(); + } + */ } diff --git a/common/src/main/java/de/mrjulsen/crn/mixin/ItemMixin.java b/common/src/main/java/de/mrjulsen/crn/mixin/ItemMixin.java new file mode 100644 index 00000000..44a10e1e --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/mixin/ItemMixin.java @@ -0,0 +1,36 @@ +package de.mrjulsen.crn.mixin; + +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +import de.mrjulsen.crn.block.AbstractAdvancedDisplayBlock; +import net.minecraft.core.BlockPos; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.item.DyeItem; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.context.UseOnContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.state.BlockState; + +@Mixin(Item.class) +public abstract class ItemMixin { + + public Item self() { + return (Item)(Object)this; + } + + @Inject(method = "useOn", at = @At(value = "HEAD"), cancellable = true) + public void onUseOn(UseOnContext context, CallbackInfoReturnable cir) { + if (self() instanceof DyeItem) { + Level level = context.getLevel(); + BlockPos pos = context.getClickedPos(); + BlockState state = level.getBlockState(pos); + if (context.getPlayer().isShiftKeyDown() && state.getBlock() instanceof AbstractAdvancedDisplayBlock block) { + cir.setReturnValue(block.use(state, level, pos, context.getPlayer(), context.getHand(), null)); + return; + } + } + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/mixin/NavigationMixin.java b/common/src/main/java/de/mrjulsen/crn/mixin/NavigationMixin.java new file mode 100644 index 00000000..a2278a54 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/mixin/NavigationMixin.java @@ -0,0 +1,60 @@ +package de.mrjulsen.crn.mixin; + +import java.util.Queue; +import java.util.concurrent.ConcurrentLinkedQueue; + +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.At.Shift; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +import com.simibubi.create.content.trains.entity.Navigation; + +import de.mrjulsen.crn.data.schedule.INavigationExtension; +import de.mrjulsen.crn.data.schedule.condition.IDelayedWaitCondition; +import de.mrjulsen.crn.data.schedule.condition.IDelayedWaitCondition.DelayedWaitConditionContext; +import de.mrjulsen.mcdragonlib.data.Pair; +import net.minecraft.world.level.Level; + +@Mixin(Navigation.class) +public abstract class NavigationMixin implements INavigationExtension { + + public Queue> delayedWaitConditions = new ConcurrentLinkedQueue<>(); + + @Override + public void addDelayedWaitCondition(Pair pair) { + delayedWaitConditions.add(pair); + } + + @Override + public boolean isDelayedWaitConditionPending() { + return !delayedWaitConditions.isEmpty(); + } + + @Inject(method = "tick", at = @At(value = "INVOKE", target = "Lcom/simibubi/create/content/trains/entity/Train;leaveStation()V", shift = Shift.BEFORE), remap = false, cancellable = true) + public void onTick(Level level, CallbackInfo ci) { + if (!delayedWaitConditions.isEmpty()) { + Pair p = delayedWaitConditions.peek(); + if (!p.getSecond().nbt().contains(IDelayedWaitCondition.NBT_DELAY)) { + p.getSecond().nbt().putInt(IDelayedWaitCondition.NBT_DELAY, 0); + } + if (p.getFirst().runDelayed(p.getSecond())) { + delayedWaitConditions.poll().getSecond().nbt().remove(IDelayedWaitCondition.NBT_DELAY); + } else { + p.getSecond().nbt().putInt(IDelayedWaitCondition.NBT_DELAY, p.getSecond().nbt().getInt(IDelayedWaitCondition.NBT_DELAY) + 1); + } + ci.cancel(); + } + } + + @Inject(method = "cancelNavigation", at = @At(value = "HEAD"), remap = false) + public void resetOnCancel(CallbackInfo ci) { + delayedWaitConditions.clear(); + } + + //@Inject(method = "startNavigation", at = @At(value = "HEAD"), remap = false) + //public void resetOnStart(DiscoveredPath path, CallbackInfoReturnable cir) { + // delayedWaitConditions.clear(); + //} +} diff --git a/common/src/main/java/de/mrjulsen/crn/mixin/ReloadableServerResourcesMixin.java b/common/src/main/java/de/mrjulsen/crn/mixin/ReloadableServerResourcesMixin.java deleted file mode 100644 index ea5e6652..00000000 --- a/common/src/main/java/de/mrjulsen/crn/mixin/ReloadableServerResourcesMixin.java +++ /dev/null @@ -1,36 +0,0 @@ -package de.mrjulsen.crn.mixin; - -import java.util.ArrayList; -import java.util.List; - -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -import de.mrjulsen.crn.util.ModUtils; -import de.mrjulsen.crn.web.WebsitePreparableReloadListener; -import net.minecraft.commands.Commands; -import net.minecraft.core.RegistryAccess; -import net.minecraft.server.ReloadableServerResources; -import net.minecraft.server.packs.resources.PreparableReloadListener; - -@Mixin(ReloadableServerResources.class) -public class ReloadableServerResourcesMixin { - - public WebsitePreparableReloadListener websitemanager; - - @Inject(method = "", at = @At(value = "TAIL")) - public void onInit(RegistryAccess.Frozen frozen, Commands.CommandSelection commandSelection, int i, CallbackInfo ci) { - this.websitemanager = new WebsitePreparableReloadListener(); - ModUtils.setWebsiteResourceManager(websitemanager); - } - - @Inject(method = "listeners", at = @At("RETURN"), cancellable = true) - private void addListener(CallbackInfoReturnable> cir) { - List listeners = new ArrayList<>(cir.getReturnValue()); - listeners.add(websitemanager); - cir.setReturnValue(listeners); - } -} diff --git a/common/src/main/java/de/mrjulsen/crn/mixin/ScheduleEntryMixin.java b/common/src/main/java/de/mrjulsen/crn/mixin/ScheduleEntryMixin.java new file mode 100644 index 00000000..37378de5 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/mixin/ScheduleEntryMixin.java @@ -0,0 +1,22 @@ +package de.mrjulsen.crn.mixin; + +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; +import org.spongepowered.asm.mixin.injection.callback.LocalCapture; + +import com.simibubi.create.content.trains.schedule.ScheduleEntry; +import net.minecraft.nbt.CompoundTag; + +/** + * Fixes a crash in Create when a condition got removed from the game + */ +@Mixin(ScheduleEntry.class) +public class ScheduleEntryMixin { + + @Inject(method = "fromTag", remap = false, at = @At(value = "RETURN"), locals = LocalCapture.CAPTURE_FAILHARD) + private static void onFromTag(CompoundTag tag, CallbackInfoReturnable cir, ScheduleEntry entry) { + entry.conditions.forEach(x -> x.removeIf(y -> y == null)); + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/mixin/ScheduleScreenMixin.java b/common/src/main/java/de/mrjulsen/crn/mixin/ScheduleScreenMixin.java index 6d737ab3..d8f8effe 100644 --- a/common/src/main/java/de/mrjulsen/crn/mixin/ScheduleScreenMixin.java +++ b/common/src/main/java/de/mrjulsen/crn/mixin/ScheduleScreenMixin.java @@ -2,7 +2,6 @@ import java.util.ArrayList; import java.util.List; - import org.spongepowered.asm.mixin.Mixin; import com.simibubi.create.content.trains.schedule.IScheduleInput; import com.simibubi.create.content.trains.schedule.ScheduleScreen; @@ -29,6 +28,7 @@ public int getTopPos() { return ((AbstractContainerScreen)(Object)this).topPos; } + /* @SuppressWarnings("resource") @Inject(method = "updateEditorSubwidgets", remap = false, at = @At(value = "INVOKE", shift = Shift.AFTER, target = "Lcom/simibubi/create/foundation/gui/ModularGuiLine;loadValues(Lnet/minecraft/nbt/CompoundTag;Ljava/util/function/Consumer;Ljava/util/function/Consumer;)V"), cancellable = true) diff --git a/common/src/main/java/de/mrjulsen/crn/mixin/StationBlockEntityMixin.java b/common/src/main/java/de/mrjulsen/crn/mixin/StationBlockEntityMixin.java new file mode 100644 index 00000000..baf9f076 --- /dev/null +++ b/common/src/main/java/de/mrjulsen/crn/mixin/StationBlockEntityMixin.java @@ -0,0 +1,109 @@ +package de.mrjulsen.crn.mixin; + +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +import org.spongepowered.asm.mixin.Mixin; + +import com.simibubi.create.content.equipment.goggles.IHaveGoggleInformation; +import com.simibubi.create.content.trains.station.StationBlockEntity; +import com.simibubi.create.foundation.utility.Lang; + +import de.mrjulsen.crn.CRNPlatformSpecific; +import de.mrjulsen.crn.CreateRailwaysNavigator; +import de.mrjulsen.crn.data.train.StationDepartureHistory.StationStats; +import de.mrjulsen.crn.registry.ModAccessorTypes; +import de.mrjulsen.mcdragonlib.DragonLib; +import de.mrjulsen.mcdragonlib.util.TextUtils; +import de.mrjulsen.mcdragonlib.util.TimeUtils; +import de.mrjulsen.mcdragonlib.util.accessor.DataAccessor; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.ChatFormatting; +import net.minecraft.client.Minecraft; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.MutableComponent; + +@Environment(EnvType.CLIENT) +@Mixin(StationBlockEntity.class) +public class StationBlockEntityMixin implements IHaveGoggleInformation { + + private StationBlockEntity self() { + return (StationBlockEntity)(Object)this; + } + + private StationStats stats; + + @SuppressWarnings("resource") + @Override + public boolean addToGoggleTooltip(List tooltip, boolean isPlayerSneaking) { + if (CRNPlatformSpecific.getStationFromBlockEntity(self()) == null) { + return false; + } + + if (Minecraft.getInstance().level.getGameTime() % 100 == 0) { + DataAccessor.getFromServer(CRNPlatformSpecific.getStationFromBlockEntity(self()).name, ModAccessorTypes.GET_STATION_DEPARTURE_HISTORY, x -> this.stats = x); + } + + Lang.builder(CreateRailwaysNavigator.MOD_ID) + .add(TextUtils.translate("goggles." + CreateRailwaysNavigator.MOD_ID + ".train_listener.departures.title")) + .forGoggles(tooltip); + + if (this.stats == null || this.stats.isEmpty()) { + Lang.builder(CreateRailwaysNavigator.MOD_ID) + .add(TextUtils.translate("goggles." + CreateRailwaysNavigator.MOD_ID + ".train_listener.departures.nothing").withStyle(ChatFormatting.RED)) + .forGoggles(tooltip); + return false; + } + + Lang.builder(CreateRailwaysNavigator.MOD_ID) + .add(TextUtils.translate("goggles." + CreateRailwaysNavigator.MOD_ID + ".train_listener.departures.any").withStyle(ChatFormatting.GRAY)) + .forGoggles(tooltip); + Lang.builder(CreateRailwaysNavigator.MOD_ID) + .add(formatTime(Minecraft.getInstance().level.getGameTime() - stats.getLastDepartureTime())) + .forGoggles(tooltip, 1); + + if (stats.hasDeparturesByLine()) { + Lang.builder(CreateRailwaysNavigator.MOD_ID) + .add(TextUtils.translate("goggles." + CreateRailwaysNavigator.MOD_ID + ".train_listener.departures.line").withStyle(ChatFormatting.GRAY)) + .forGoggles(tooltip); + + List> data = stats.getDeparturesByLine(); + for (Map.Entry d : data) { + Lang.builder(CreateRailwaysNavigator.MOD_ID) + .add(TextUtils.empty().append(TextUtils.text(d.getKey() + ": ").withStyle(ChatFormatting.DARK_AQUA)).append(formatTime(Minecraft.getInstance().level.getGameTime() - d.getValue()))) + .forGoggles(tooltip, 1); + } + if (stats.getDeparturesByLineTotalCount() > data.size()) { + Lang.builder(CreateRailwaysNavigator.MOD_ID) + .add(TextUtils.translate("goggles." + CreateRailwaysNavigator.MOD_ID + ".train_listener.departures.has_more", stats.getDeparturesByLineTotalCount() - data.size()).withStyle(ChatFormatting.GRAY)) + .forGoggles(tooltip); + } + } + + if (stats.hasDeparturesByGroup()) { + Lang.builder(CreateRailwaysNavigator.MOD_ID) + .add(TextUtils.translate("goggles." + CreateRailwaysNavigator.MOD_ID + ".train_listener.departures.group").withStyle(ChatFormatting.GRAY)) + .forGoggles(tooltip); + + List> data = stats.getDeparturesByGroup(); + for (Map.Entry d : data) { + Lang.builder(CreateRailwaysNavigator.MOD_ID) + .add(TextUtils.empty().append(TextUtils.text(d.getKey() + ": ").withStyle(ChatFormatting.DARK_AQUA)).append(formatTime(Minecraft.getInstance().level.getGameTime() - d.getValue()))) + .forGoggles(tooltip, 1); + } + if (stats.getDeparturesByGroupTotalCount() > data.size()) { + Lang.builder(CreateRailwaysNavigator.MOD_ID) + .add(TextUtils.translate("goggles." + CreateRailwaysNavigator.MOD_ID + ".train_listener.departures.has_more", stats.getDeparturesByGroupTotalCount() - data.size()).withStyle(ChatFormatting.GRAY)) + .forGoggles(tooltip); + } + } + + return true; + } + + private MutableComponent formatTime(long ticks) { + return TextUtils.text(TimeUtils.formatDurationMs(TimeUnit.SECONDS.toMillis((long)(ticks / DragonLib.tps())))).withStyle(ChatFormatting.AQUA); + } +} diff --git a/common/src/main/java/de/mrjulsen/crn/network/packets/cts/AdvancedDisplayUpdatePacket.java b/common/src/main/java/de/mrjulsen/crn/network/packets/cts/AdvancedDisplayUpdatePacket.java index 8cbc8a46..86270854 100644 --- a/common/src/main/java/de/mrjulsen/crn/network/packets/cts/AdvancedDisplayUpdatePacket.java +++ b/common/src/main/java/de/mrjulsen/crn/network/packets/cts/AdvancedDisplayUpdatePacket.java @@ -4,11 +4,14 @@ import de.mrjulsen.crn.block.AbstractAdvancedSidedDisplayBlock; import de.mrjulsen.crn.block.blockentity.AdvancedDisplayBlockEntity; +import de.mrjulsen.crn.block.display.properties.IDisplaySettings; import de.mrjulsen.crn.block.properties.ESide; +import de.mrjulsen.crn.client.AdvancedDisplaysRegistry; import de.mrjulsen.crn.client.AdvancedDisplaysRegistry.DisplayTypeResourceKey; import de.mrjulsen.mcdragonlib.net.IPacketBase; import dev.architectury.networking.NetworkManager.PacketContext; import net.minecraft.core.BlockPos; +import net.minecraft.nbt.CompoundTag; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; @@ -18,27 +21,34 @@ public class AdvancedDisplayUpdatePacket implements IPacketBase { - be.setDisplayTypeKey(packet.key); + be.setDisplayType(packet.key, packet.settings); if (level.getBlockState(be.getBlockPos()).getBlock() instanceof AbstractAdvancedSidedDisplayBlock) { BlockState state = level.getBlockState(be.getBlockPos()); state = state.setValue(AbstractAdvancedSidedDisplayBlock.SIDE, packet.doubleSided ? ESide.BOTH : ESide.FRONT); diff --git a/common/src/main/java/de/mrjulsen/crn/registry/ClientWrapper.java b/common/src/main/java/de/mrjulsen/crn/registry/ClientWrapper.java index 407612b5..bf7c88a2 100644 --- a/common/src/main/java/de/mrjulsen/crn/registry/ClientWrapper.java +++ b/common/src/main/java/de/mrjulsen/crn/registry/ClientWrapper.java @@ -15,12 +15,17 @@ public class ClientWrapper { public static final CTSpriteShiftEntry CT_ADVANCED_DISPLAY_ALL = ClientWrapper.getCT(AllCTTypes.OMNIDIRECTIONAL, "advanced_display", "advanced_display"); + public static final CTSpriteShiftEntry CT_ADVANCED_DISPLAY_ALL_BORDER = ClientWrapper.getCT(AllCTTypes.OMNIDIRECTIONAL, "advanced_display_border", "advanced_display_border"); public static final CTSpriteShiftEntry CT_ADVANCED_DISPLAY = ClientWrapper.getCT(AllCTTypes.OMNIDIRECTIONAL, "advanced_display", "advanced_display"); - public static final CTSpriteShiftEntry CT_HORIZONTAL_ADVANCED_DISPLAY = ClientWrapper.getCT(AllCTTypes.HORIZONTAL_KRYPPERS, "advanced_display", "advanced_display"); + public static final CTSpriteShiftEntry CT_ADVANCED_DISPLAY_BORDER = ClientWrapper.getCT(AllCTTypes.OMNIDIRECTIONAL, "advanced_display_border", "advanced_display_border"); + //public static final CTSpriteShiftEntry CT_HORIZONTAL_ADVANCED_DISPLAY = ClientWrapper.getCT(AllCTTypes.HORIZONTAL_KRYPPERS, "advanced_display_border", "advanced_display_border"); + //public static final CTSpriteShiftEntry CT_HORIZONTAL_ADVANCED_DISPLAY_BORDER = ClientWrapper.getCT(AllCTTypes.HORIZONTAL_KRYPPERS, "advanced_display_border", "advanced_display_border"); public static final CTSpriteShiftEntry CT_ADVANCED_DISPLAY_SMALL = ClientWrapper.getCT(AllCTTypes.OMNIDIRECTIONAL, "advanced_display_small", "advanced_display_small"); + public static final CTSpriteShiftEntry CT_ADVANCED_DISPLAY_SMALL_BORDER = ClientWrapper.getCT(AllCTTypes.OMNIDIRECTIONAL, "advanced_display_small_border", "advanced_display_small_border"); public static final CTSpriteShiftEntry CT_HORIZONTAL_ADVANCED_DISPLAY_SMALL = ClientWrapper.getCT(AllCTTypes.HORIZONTAL_KRYPPERS, "advanced_display_small", "advanced_display_small"); + public static final CTSpriteShiftEntry CT_HORIZONTAL_ADVANCED_DISPLAY_SMALL_BORDER = ClientWrapper.getCT(AllCTTypes.HORIZONTAL_KRYPPERS, "advanced_display_small_border", "advanced_display_small_border"); public static void registerCTBehviour(Block entry, Supplier behaviorSupplier) { diff --git a/common/src/main/java/de/mrjulsen/crn/registry/ModAccessorTypes.java b/common/src/main/java/de/mrjulsen/crn/registry/ModAccessorTypes.java index cb7d3940..ee90a1bc 100644 --- a/common/src/main/java/de/mrjulsen/crn/registry/ModAccessorTypes.java +++ b/common/src/main/java/de/mrjulsen/crn/registry/ModAccessorTypes.java @@ -3,12 +3,12 @@ import java.util.UUID; import java.util.List; import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.stream.Collectors; - import com.simibubi.create.content.trains.entity.Train; import java.util.Collection; import java.util.Collections; +import java.util.HashMap; +import java.util.LinkedList; import java.util.Map; import java.util.Queue; import java.util.Set; @@ -38,6 +38,7 @@ import de.mrjulsen.crn.data.train.TrainTravelSection; import de.mrjulsen.crn.data.train.TrainUtils; import de.mrjulsen.crn.data.train.ClientTrainStop.TrainStopRealTimeData; +import de.mrjulsen.crn.data.train.StationDepartureHistory.StationStats; import de.mrjulsen.crn.data.train.portable.NextConnectionsDisplayData; import de.mrjulsen.crn.data.train.portable.TrainDisplayData; import de.mrjulsen.crn.debug.TrainDebugData; @@ -498,19 +499,24 @@ public final class ModAccessorTypes { } TrainData data = TrainListener.data.get(in); - Map values = data.getPredictions().stream().map(a -> new TrainStopRealTimeData( - a.getStationTag().getClientTag(a.getStationName()), - a.getEntryIndex(), - a.getScheduledArrivalTime(), - a.getScheduledDepartureTime(), - a.getRealTimeArrivalTime(), - a.getRealTimeDepartureTime(), - a.getArrivalTimeDeviation(), - a.getDepartureTimeDeviation(), - a.getRealTimeArrivalTicks(), - a.getCurrentCycle() - )).collect(Collectors.toMap(a -> a.entryIndex(), a -> a)); - nbt.put(DataAccessorType.DEFAULT_NBT_DATA, new TrainRealTimeData(data.getSessionId(), values, data.getStatus(), data.isCancelled()).toNbt()); + List predictions = data.getPredictions(); + Map values = new HashMap<>(); + for (TrainPrediction prediction : predictions) { + TrainStopRealTimeData realTimeData = new TrainStopRealTimeData( + prediction.getStationTag().getClientTag(prediction.getStationName()), + prediction.getEntryIndex(), + prediction.getScheduledArrivalTime(), + prediction.getScheduledDepartureTime(), + prediction.getRealTimeArrivalTime(), + prediction.getRealTimeDepartureTime(), + prediction.getArrivalTimeDeviation(), + prediction.getDepartureTimeDeviation(), + prediction.getRealTimeArrivalTicks(), + prediction.getCurrentCycle() + ); + values.put(realTimeData.entryIndex(), realTimeData); + } + nbt.put(DataAccessorType.DEFAULT_NBT_DATA, TrainRealTimeData.createServer(data.getSessionId(), values, data.getStatus(), data.isCancelled()).toNbt()); return false; }, (hasMore, previousData, iteration, nbt) -> { return nbt.contains(DataAccessorType.DEFAULT_NBT_DATA) ? TrainRealTimeData.fromNbt(nbt.getCompound(DataAccessorType.DEFAULT_NBT_DATA)) : null; @@ -567,7 +573,7 @@ public final class ModAccessorTypes { } )); - public static final DataAccessorType GET_TRAIN_DISPLAY_DATA = DataAccessorType.register(new ResourceLocation(CreateRailwaysNavigator.MOD_ID, "get_train_display_data"), DataAccessorType.Builder.create( + public static final DataAccessorType GET_TRAIN_DISPLAY_DATA_FROM_SERVER = DataAccessorType.register(new ResourceLocation(CreateRailwaysNavigator.MOD_ID, "get_train_display_data"), DataAccessorType.Builder.create( (in, nbt) -> { nbt.putUUID(DataAccessorType.DEFAULT_NBT_DATA, in); }, (nbt) -> { @@ -732,7 +738,7 @@ public static record NavigationData(String start, String end, UUID player) {} settings.getTagByName(TagName.of(in.end())).orElse(settings.getOrCreateStationTagFor(in.end())), in.player(), true - ); + ); temp.setFirst(new ConcurrentLinkedQueue<>(routes)); } @SuppressWarnings("unchecked") @@ -773,26 +779,31 @@ public static record DepartureRoutesData(String stationTagName, UUID player) {} if (temp.getFirst() == null) { UserSettings settings = UserSettings.getSettingsFor(in.player(), true); StationTag station = GlobalSettings.getInstance().getOrCreateStationTagFor(TagName.of(in.stationTagName())); - Set trains = TrainUtils.getDepartingTrainsAt(station).stream().filter(x -> + Set trains = TrainUtils.getDepartingTrainsAt(station); + trains.removeIf(x -> !( TrainUtils.isTrainUsable(x) && !GlobalSettings.getInstance().isTrainBlacklisted(x) && TrainListener.data.containsKey(x.id) - ).collect(Collectors.toSet()); + )); - List> routesL = new ArrayList<>(); + List> routesL = new LinkedList<>(); for (Train train : trains) { TrainData data = TrainListener.data.get(train.id); - List matchingPredictions = data.getPredictionsChronologically().stream().filter(x -> x.getStationTag().equals(station)).toList(); + List matchingPredictions = data.getPredictionsChronologically(); for (TrainPrediction prediction : matchingPredictions) { + if (!prediction.getStationTag().equals(station)) { + continue; + } + TrainTravelSection section = prediction.getSection(); - if ((!section.isUsable() && !(section.isFirstStop(prediction) && section.previousSection().isUsable() && section.previousSection().shouldIncludeNextStationOfNextSection())) || (section.getTrainGroup() != null && settings.searchExcludedTrainGroups.getValue().contains(section.getTrainGroup().getGroupName()))) { + if ((!section.isUsable() && !(section.isFirstStop(prediction) && section.previousSection().isUsable() && section.previousSection().shouldIncludeNextStationOfNextSection())) || (section.getTrainGroup().map(x -> settings.searchExcludedTrainGroups.getValue().contains(x.getGroupName())).orElse(false))) { continue; } TrainTravelSection previousSection = section.previousSection(); boolean isStart = section.isFirstStop(prediction); - boolean isStartAndFinal = isStart && previousSection.isUsable() && previousSection.shouldIncludeNextStationOfNextSection() && (previousSection.getTrainGroup() == null || !settings.searchExcludedTrainGroups.getValue().contains(previousSection.getTrainGroup().getGroupName())); + boolean isStartAndFinal = isStart && previousSection.isUsable() && previousSection.shouldIncludeNextStationOfNextSection() && (previousSection.getTrainGroup().map(x -> !settings.searchExcludedTrainGroups.getValue().contains(x.getGroupName())).orElse(true)); TrainStop stop = new TrainStop(prediction); stop.simulateTicks(settings.searchDepartureInTicks.getValue()); @@ -801,7 +812,7 @@ public static record DepartureRoutesData(String stationTagName, UUID player) {} Route route = new Route(List.of(new RoutePart(data.getSessionId(), train.id, List.of(stop /* current/target */, from /* from */), section.getAllStops(settings.searchDepartureInTicks.getValue(), prediction.getEntryIndex()))), false); - if ((!isStart || isStartAndFinal) && (section.getTrainGroup() == null || !settings.searchExcludedTrainGroups.getValue().contains(section.getTrainGroup().getGroupName()))) { + if ((!isStart || isStartAndFinal) && (section.getTrainGroup().map(x -> !settings.searchExcludedTrainGroups.getValue().contains(x.getGroupName())).orElse(true))) { Route selectedRoute = route; if (isStartAndFinal) { @@ -811,7 +822,7 @@ public static record DepartureRoutesData(String stationTagName, UUID player) {} } routesL.add(Pair.of(true, selectedRoute)); // Arrival } - if ((section.isUsable()) && (section.getTrainGroup() == null || !settings.searchExcludedTrainGroups.getValue().contains(section.getTrainGroup().getGroupName()))) { + if ((section.isUsable()) && (section.getTrainGroup().map(x -> !settings.searchExcludedTrainGroups.getValue().contains(x.getGroupName())).orElse(true))) { routesL.add(Pair.of(false, route)); // Departure } } @@ -866,8 +877,10 @@ public static record DeparturesData(UUID stationTagId, UUID trainId) {} return false; } StationTag tag = GlobalSettings.getInstance().getStationTag(in.stationTagId()).get(); - ListTag list = new ListTag(); - list.addAll(TrainUtils.getDeparturesAt(tag, in.trainId()).stream().map(x -> x.toNbt(true)).toList()); + ListTag list = new ListTag(); + for (TrainStop stop : TrainUtils.getDeparturesAt(tag, in.trainId())) { + list.add(stop.toNbt(true)); + } nbt.put(DataAccessorType.DEFAULT_NBT_DATA, list); } catch (Exception e) { CreateRailwaysNavigator.LOGGER.error("Next connections error.", e); @@ -890,7 +903,9 @@ public static record DeparturesData(UUID stationTagId, UUID trainId) {} public static final DataAccessorType, List> GET_ALL_TRAINS_DEBUG_DATA = DataAccessorType.register(new ResourceLocation(CreateRailwaysNavigator.MOD_ID, "get_all_trains_debug_data"), DataAccessorType.Builder.createNoInput( (player, in, temp, nbt, iteration) -> { ListTag list = new ListTag(); - list.addAll(TrainListener.data.values().stream().map(x -> TrainDebugData.fromTrain(x).toNbt()).toList()); + for (TrainData x : TrainListener.data.values()) { + list.add(TrainDebugData.fromTrain(x).toNbt()); + } nbt.put(DataAccessorType.DEFAULT_NBT_DATA, list); return false; }, (hasMore, data, iteration, nbt) -> { @@ -930,6 +945,19 @@ public static record DeparturesData(UUID stationTagId, UUID trainId) {} return false; } )); + + public static final DataAccessorType GET_STATION_DEPARTURE_HISTORY = DataAccessorType.register(new ResourceLocation(CreateRailwaysNavigator.MOD_ID, "get_station_departure_history"), DataAccessorType.Builder.create( + (in, nbt) -> { + nbt.putString(DataAccessorType.DEFAULT_NBT_DATA, in); + }, (nbt) -> { + return nbt.getString(DataAccessorType.DEFAULT_NBT_DATA); + }, (player, in, temp, nbt, iteration) -> { + nbt.put(DataAccessorType.DEFAULT_NBT_DATA, new StationStats(in).toNbt()); + return false; + }, (hasMore, data, iteration, nbt) -> { + return StationStats.fromNbt(nbt.getCompound(DataAccessorType.DEFAULT_NBT_DATA)); + } + )); public static void init() {} } diff --git a/common/src/main/java/de/mrjulsen/crn/registry/ModBlocks.java b/common/src/main/java/de/mrjulsen/crn/registry/ModBlocks.java index 89b8ab72..36afa128 100644 --- a/common/src/main/java/de/mrjulsen/crn/registry/ModBlocks.java +++ b/common/src/main/java/de/mrjulsen/crn/registry/ModBlocks.java @@ -10,6 +10,7 @@ import com.tterrag.registrate.util.nullness.NonNullConsumer; import de.mrjulsen.crn.CreateRailwaysNavigator; +import de.mrjulsen.crn.block.AbstractAdvancedDisplayBlock; import de.mrjulsen.crn.block.AdvancedDisplayBlock; import de.mrjulsen.crn.block.AdvancedDisplayBoardBlock; import de.mrjulsen.crn.block.AdvancedDisplayHalfPanelBlock; @@ -34,7 +35,9 @@ public class ModBlocks { public static final BlockEntry ADVANCED_DISPLAY_BLOCK = CreateRailwaysNavigator.REGISTRATE.block("advanced_display_block", AdvancedDisplayBlock::new) .onRegister(connectedTextures(() -> new AdvancedDisplayCTBehaviour(ClientWrapper.CT_ADVANCED_DISPLAY_ALL))) + .onRegister(connectedTextures(() -> new AdvancedDisplayCTBehaviour(ClientWrapper.CT_ADVANCED_DISPLAY_ALL_BORDER))) .addLayer(() -> RenderType::cutout) + .color(() -> AbstractAdvancedDisplayBlock::getDisplayColor) .initialProperties(SharedProperties::softMetal) .transform(TagGen.pickaxeOnly()) .onRegister(AllDisplayBehaviours.assignDataBehaviour(new AdvancedDisplayTarget())) @@ -44,7 +47,9 @@ public class ModBlocks { .register(); public static final BlockEntry ADVANCED_DISPLAY_SLAB = CreateRailwaysNavigator.REGISTRATE.block("advanced_display_slab", AdvancedDisplaySlabBlock::new) .onRegister(connectedTextures(() -> new AdvancedDisplaySmallCTBehaviour(ClientWrapper.CT_HORIZONTAL_ADVANCED_DISPLAY_SMALL, ClientWrapper.CT_ADVANCED_DISPLAY_SMALL))) + .onRegister(connectedTextures(() -> new AdvancedDisplaySmallCTBehaviour(ClientWrapper.CT_HORIZONTAL_ADVANCED_DISPLAY_SMALL_BORDER, ClientWrapper.CT_ADVANCED_DISPLAY_SMALL_BORDER))) .addLayer(() -> RenderType::cutout) + .color(() -> AbstractAdvancedDisplayBlock::getDisplayColor) .initialProperties(SharedProperties::softMetal) .transform(TagGen.pickaxeOnly()) .onRegister(AllDisplayBehaviours.assignDataBehaviour(new AdvancedDisplayTarget())) @@ -54,7 +59,9 @@ public class ModBlocks { public static final BlockEntry ADVANCED_DISPLAY = CreateRailwaysNavigator.REGISTRATE.block("advanced_display", AdvancedDisplayBoardBlock::new) .onRegister(connectedTextures(() -> new AdvancedDisplayCTBehaviour(ClientWrapper.CT_ADVANCED_DISPLAY))) + .onRegister(connectedTextures(() -> new AdvancedDisplayCTBehaviour(ClientWrapper.CT_ADVANCED_DISPLAY_BORDER))) .addLayer(() -> RenderType::cutout) + .color(() -> AbstractAdvancedDisplayBlock::getDisplayColor) .initialProperties(SharedProperties::softMetal) .transform(TagGen.pickaxeOnly()) .onRegister(AllDisplayBehaviours.assignDataBehaviour(new AdvancedDisplayTarget())) @@ -64,7 +71,9 @@ public class ModBlocks { public static final BlockEntry ADVANCED_DISPLAY_SMALL = CreateRailwaysNavigator.REGISTRATE.block("advanced_display_small", AdvancedDisplaySmallBlock::new) .onRegister(connectedTextures(() -> new AdvancedDisplaySmallCTBehaviour(ClientWrapper.CT_HORIZONTAL_ADVANCED_DISPLAY_SMALL, ClientWrapper.CT_ADVANCED_DISPLAY_SMALL))) + .onRegister(connectedTextures(() -> new AdvancedDisplaySmallCTBehaviour(ClientWrapper.CT_HORIZONTAL_ADVANCED_DISPLAY_SMALL_BORDER, ClientWrapper.CT_ADVANCED_DISPLAY_SMALL_BORDER))) .addLayer(() -> RenderType::cutout) + .color(() -> AbstractAdvancedDisplayBlock::getDisplayColor) .initialProperties(SharedProperties::softMetal) .transform(TagGen.pickaxeOnly()) .onRegister(AllDisplayBehaviours.assignDataBehaviour(new AdvancedDisplayTarget())) @@ -73,8 +82,10 @@ public class ModBlocks { .register(); public static final BlockEntry ADVANCED_DISPLAY_PANEL = CreateRailwaysNavigator.REGISTRATE.block("advanced_display_panel", AdvancedDisplayPanelBlock::new) - .onRegister(connectedTextures(() -> new AdvancedDisplayCTBehaviour(ClientWrapper.CT_ADVANCED_DISPLAY))) + .onRegister(connectedTextures(() -> new AdvancedDisplayCTBehaviour(ClientWrapper.CT_ADVANCED_DISPLAY))) + .onRegister(connectedTextures(() -> new AdvancedDisplayCTBehaviour(ClientWrapper.CT_ADVANCED_DISPLAY_BORDER))) .addLayer(() -> RenderType::cutout) + .color(() -> AbstractAdvancedDisplayBlock::getDisplayColor) .initialProperties(SharedProperties::softMetal) .transform(TagGen.pickaxeOnly()) .onRegister(AllDisplayBehaviours.assignDataBehaviour(new AdvancedDisplayTarget())) @@ -83,8 +94,10 @@ public class ModBlocks { .register(); public static final BlockEntry ADVANCED_DISPLAY_HALF_PANEL = CreateRailwaysNavigator.REGISTRATE.block("advanced_display_half_panel", AdvancedDisplayHalfPanelBlock::new) - .onRegister(connectedTextures(() -> new AdvancedDisplaySmallCTBehaviour(ClientWrapper.CT_HORIZONTAL_ADVANCED_DISPLAY_SMALL, ClientWrapper.CT_ADVANCED_DISPLAY_SMALL))) + .onRegister(connectedTextures(() -> new AdvancedDisplaySmallCTBehaviour(ClientWrapper.CT_HORIZONTAL_ADVANCED_DISPLAY_SMALL, ClientWrapper.CT_ADVANCED_DISPLAY_SMALL))) + .onRegister(connectedTextures(() -> new AdvancedDisplaySmallCTBehaviour(ClientWrapper.CT_HORIZONTAL_ADVANCED_DISPLAY_SMALL_BORDER, ClientWrapper.CT_ADVANCED_DISPLAY_SMALL_BORDER))) .addLayer(() -> RenderType::cutout) + .color(() -> AbstractAdvancedDisplayBlock::getDisplayColor) .initialProperties(SharedProperties::softMetal) .transform(TagGen.pickaxeOnly()) .onRegister(AllDisplayBehaviours.assignDataBehaviour(new AdvancedDisplayTarget())) @@ -93,8 +106,10 @@ public class ModBlocks { .register(); public static final BlockEntry ADVANCED_DISPLAY_SLOPED = CreateRailwaysNavigator.REGISTRATE.block("advanced_display_sloped", AdvancedDisplaySlopedBlock::new) - .onRegister(connectedTextures(() -> new AdvancedDisplaySmallCTBehaviour(ClientWrapper.CT_HORIZONTAL_ADVANCED_DISPLAY_SMALL, ClientWrapper.CT_ADVANCED_DISPLAY_SMALL))) + .onRegister(connectedTextures(() -> new AdvancedDisplaySmallCTBehaviour(ClientWrapper.CT_HORIZONTAL_ADVANCED_DISPLAY_SMALL, ClientWrapper.CT_ADVANCED_DISPLAY_SMALL))) + .onRegister(connectedTextures(() -> new AdvancedDisplaySmallCTBehaviour(ClientWrapper.CT_HORIZONTAL_ADVANCED_DISPLAY_SMALL_BORDER, ClientWrapper.CT_ADVANCED_DISPLAY_SMALL_BORDER))) .addLayer(() -> RenderType::cutout) + .color(() -> AbstractAdvancedDisplayBlock::getDisplayColor) .initialProperties(SharedProperties::softMetal) .transform(TagGen.pickaxeOnly()) .onRegister(AllDisplayBehaviours.assignDataBehaviour(new AdvancedDisplayTarget())) diff --git a/common/src/main/java/de/mrjulsen/crn/registry/ModDisplayTypes.java b/common/src/main/java/de/mrjulsen/crn/registry/ModDisplayTypes.java index 95edd1e1..0e72c00e 100644 --- a/common/src/main/java/de/mrjulsen/crn/registry/ModDisplayTypes.java +++ b/common/src/main/java/de/mrjulsen/crn/registry/ModDisplayTypes.java @@ -1,11 +1,20 @@ package de.mrjulsen.crn.registry; -import de.mrjulsen.crn.CreateRailwaysNavigator; +import de.mrjulsen.crn.block.display.properties.DepartureBoardDisplayTableSettings; +import de.mrjulsen.crn.block.display.properties.PassengerInformationDetailedSettings; +import de.mrjulsen.crn.block.display.properties.PassengerInformationScrollingTextSettings; +import de.mrjulsen.crn.block.display.properties.PlatformDisplayFocusSettings; +import de.mrjulsen.crn.block.display.properties.PlatformDisplayScrollingTextSettings; +import de.mrjulsen.crn.block.display.properties.PlatformDisplayTableSettings; +import de.mrjulsen.crn.block.display.properties.TrainDestinationCompactSettings; +import de.mrjulsen.crn.block.display.properties.TrainDestinationDetailedSettings; +import de.mrjulsen.crn.block.display.properties.TrainDestinationExtendedSettings; import de.mrjulsen.crn.block.properties.EDisplayInfo; import de.mrjulsen.crn.block.properties.EDisplayType; import de.mrjulsen.crn.client.AdvancedDisplaysRegistry; -import de.mrjulsen.crn.client.AdvancedDisplaysRegistry.DisplayTypeInfo; +import de.mrjulsen.crn.client.AdvancedDisplaysRegistry.DisplayProperties; import de.mrjulsen.crn.client.AdvancedDisplaysRegistry.DisplayTypeResourceKey; +import de.mrjulsen.crn.client.ber.variants.BERDepartureBoardTable; import de.mrjulsen.crn.client.ber.variants.BERPassengerInfoInformative; import de.mrjulsen.crn.client.ber.variants.BERPassengerInfoSimple; import de.mrjulsen.crn.client.ber.variants.BERPlatformDetailed; @@ -14,64 +23,67 @@ import de.mrjulsen.crn.client.ber.variants.BERTrainDestinationDetailed; import de.mrjulsen.crn.client.ber.variants.BERTrainDestinationInformative; import de.mrjulsen.crn.client.ber.variants.BERTrainDestinationSimple; -import net.minecraft.resources.ResourceLocation; public final class ModDisplayTypes { - public static final DisplayTypeResourceKey PASSENGER_INFORMATION_RUNNING_TEXT = AdvancedDisplaysRegistry.registerDisplayType( - EDisplayType.PASSENGER_INFORMATION, new ResourceLocation(CreateRailwaysNavigator.MOD_ID, "running_text"), - BERPassengerInfoSimple::new, new DisplayTypeInfo(true, null)); + public static final DisplayTypeResourceKey PASSENGER_INFORMATION_RUNNING_TEXT = AdvancedDisplaysRegistry.register( + EDisplayType.PASSENGER_INFORMATION, "running_text", + PassengerInformationScrollingTextSettings::new, BERPassengerInfoSimple::new, new DisplayProperties(true, null)); - public static final DisplayTypeResourceKey PASSENGER_INFORMATION_OVERVIEW = AdvancedDisplaysRegistry.registerDisplayType( - EDisplayType.PASSENGER_INFORMATION, new ResourceLocation(CreateRailwaysNavigator.MOD_ID, "detailed_with_schedule"), - BERPassengerInfoInformative::new, new DisplayTypeInfo(false, null)); + public static final DisplayTypeResourceKey PASSENGER_INFORMATION_OVERVIEW = AdvancedDisplaysRegistry.register( + EDisplayType.PASSENGER_INFORMATION, "detailed_with_schedule", + PassengerInformationDetailedSettings::new, BERPassengerInfoInformative::new, new DisplayProperties(false, null)); - public static final DisplayTypeResourceKey TRAIN_DESTINATION_SIMPLE = AdvancedDisplaysRegistry.registerDisplayType( - EDisplayType.TRAIN_DESTINATION, new ResourceLocation(CreateRailwaysNavigator.MOD_ID, "simple"), - BERTrainDestinationSimple::new, new DisplayTypeInfo(true, null)); + public static final DisplayTypeResourceKey TRAIN_DESTINATION_SIMPLE = AdvancedDisplaysRegistry.register( + EDisplayType.TRAIN_DESTINATION, "simple", + TrainDestinationCompactSettings::new, BERTrainDestinationSimple::new, new DisplayProperties(true, null)); - public static final DisplayTypeResourceKey TRAIN_DESTINATION_DETAILED = AdvancedDisplaysRegistry.registerDisplayType( - EDisplayType.TRAIN_DESTINATION, new ResourceLocation(CreateRailwaysNavigator.MOD_ID, "extended"), - BERTrainDestinationDetailed::new, new DisplayTypeInfo(true, null)); + public static final DisplayTypeResourceKey TRAIN_DESTINATION_DETAILED = AdvancedDisplaysRegistry.register( + EDisplayType.TRAIN_DESTINATION, "extended", + TrainDestinationExtendedSettings::new, BERTrainDestinationDetailed::new, new DisplayProperties(true, null)); - public static final DisplayTypeResourceKey TRAIN_DESTINATION_OVERVIEW = AdvancedDisplaysRegistry.registerDisplayType( - EDisplayType.TRAIN_DESTINATION, new ResourceLocation(CreateRailwaysNavigator.MOD_ID, "detailed"), - BERTrainDestinationInformative::new, new DisplayTypeInfo(true, null)); + public static final DisplayTypeResourceKey TRAIN_DESTINATION_OVERVIEW = AdvancedDisplaysRegistry.register( + EDisplayType.TRAIN_DESTINATION, "detailed", + TrainDestinationDetailedSettings::new, BERTrainDestinationInformative::new, new DisplayProperties(true, null)); - public static final DisplayTypeResourceKey PLATFORM_RUNNING_TEXT = AdvancedDisplaysRegistry.registerDisplayType( - EDisplayType.PLATFORM, new ResourceLocation(CreateRailwaysNavigator.MOD_ID, "running_text"), - BERPlatformSimple::new, new DisplayTypeInfo(true, be -> 32)); + public static final DisplayTypeResourceKey PLATFORM_RUNNING_TEXT = AdvancedDisplaysRegistry.register( + EDisplayType.PLATFORM, "running_text", + PlatformDisplayScrollingTextSettings::new, BERPlatformSimple::new, new DisplayProperties(true, be -> 16)); - public static final DisplayTypeResourceKey PLATFORM_TABLE = AdvancedDisplaysRegistry.registerDisplayType( - EDisplayType.PLATFORM, new ResourceLocation(CreateRailwaysNavigator.MOD_ID, "table"), - BERPlatformDetailed::new, new DisplayTypeInfo(false, be -> be.getYSize() * 3 - 1)); + public static final DisplayTypeResourceKey PLATFORM_TABLE = AdvancedDisplaysRegistry.register( + EDisplayType.PLATFORM, "table", + PlatformDisplayTableSettings::new, BERPlatformDetailed::new, new DisplayProperties(false, be -> be.getYSize() * 3 - 1)); - public static final DisplayTypeResourceKey PLATFORM_FOCUS = AdvancedDisplaysRegistry.registerDisplayType( - EDisplayType.PLATFORM, new ResourceLocation(CreateRailwaysNavigator.MOD_ID, "focus"), - BERPlatformInformative::new, new DisplayTypeInfo(false, be -> be.getYSize() * 3 - 2)); + public static final DisplayTypeResourceKey PLATFORM_FOCUS = AdvancedDisplaysRegistry.register( + EDisplayType.PLATFORM, "focus", + PlatformDisplayFocusSettings::new, BERPlatformInformative::new, new DisplayProperties(false, be -> be.getYSize() * 3 - 2)); + + public static final DisplayTypeResourceKey DEPARTURE_BOARD_TABLE = AdvancedDisplaysRegistry.register( + EDisplayType.DEPARTURE_BOARD, "table", + DepartureBoardDisplayTableSettings::new, BERDepartureBoardTable::new, new DisplayProperties(false, be -> be.getYSize() * 3 - 1)); @Deprecated public static DisplayTypeResourceKey legacy_getKeyForType(EDisplayType type, EDisplayInfo info) { switch (type) { case PASSENGER_INFORMATION -> { - switch (info) { - case INFORMATIVE -> { return PASSENGER_INFORMATION_OVERVIEW; } - default -> { return PASSENGER_INFORMATION_RUNNING_TEXT; } - } + return switch (info) { + case INFORMATIVE -> PASSENGER_INFORMATION_OVERVIEW; + default -> PASSENGER_INFORMATION_RUNNING_TEXT; + }; } case TRAIN_DESTINATION -> { - switch (info) { - case DETAILED -> { return TRAIN_DESTINATION_DETAILED; } - case INFORMATIVE -> { return TRAIN_DESTINATION_OVERVIEW; } - default -> { return TRAIN_DESTINATION_SIMPLE; } - } + return switch (info) { + case DETAILED -> TRAIN_DESTINATION_DETAILED; + case INFORMATIVE -> TRAIN_DESTINATION_OVERVIEW; + default -> TRAIN_DESTINATION_SIMPLE; + }; } case PLATFORM -> { - switch (info) { - case DETAILED -> { return PLATFORM_TABLE; } - case INFORMATIVE -> { return PLATFORM_FOCUS; } - default -> { return PLATFORM_RUNNING_TEXT; } - } + return switch (info) { + case DETAILED -> PLATFORM_TABLE; + case INFORMATIVE -> PLATFORM_FOCUS; + default -> PLATFORM_RUNNING_TEXT; + }; } default -> { return TRAIN_DESTINATION_SIMPLE; } } diff --git a/common/src/main/java/de/mrjulsen/crn/registry/ModSchedule.java b/common/src/main/java/de/mrjulsen/crn/registry/ModSchedule.java index 83a424dd..382fad91 100644 --- a/common/src/main/java/de/mrjulsen/crn/registry/ModSchedule.java +++ b/common/src/main/java/de/mrjulsen/crn/registry/ModSchedule.java @@ -9,6 +9,7 @@ import de.mrjulsen.crn.CreateRailwaysNavigator; import de.mrjulsen.crn.data.schedule.condition.DynamicDelayCondition; +import de.mrjulsen.crn.data.schedule.condition.TrainSeparationCondition; import de.mrjulsen.crn.data.schedule.instruction.ResetTimingsInstruction; import de.mrjulsen.crn.data.schedule.instruction.TravelSectionInstruction; import net.minecraft.resources.ResourceLocation; @@ -20,6 +21,7 @@ public class ModSchedule { registerInstruction("reset_timings", ResetTimingsInstruction::new); registerCondition("dynamic_delay", DynamicDelayCondition::new); + registerCondition("train_separation", TrainSeparationCondition::new); } private static void registerInstruction(String name, Supplier factory) { diff --git a/common/src/main/java/de/mrjulsen/crn/registry/ModTrainStatusInfos.java b/common/src/main/java/de/mrjulsen/crn/registry/ModTrainStatusInfos.java index e9f23df3..d6e7481f 100644 --- a/common/src/main/java/de/mrjulsen/crn/registry/ModTrainStatusInfos.java +++ b/common/src/main/java/de/mrjulsen/crn/registry/ModTrainStatusInfos.java @@ -1,11 +1,9 @@ package de.mrjulsen.crn.registry; -import java.util.Optional; - import com.simibubi.create.content.trains.entity.Train; import de.mrjulsen.crn.CreateRailwaysNavigator; -import de.mrjulsen.crn.client.lang.ELanguage; +import de.mrjulsen.crn.client.lang.CustomLanguage; import de.mrjulsen.crn.data.train.TrainListener; import de.mrjulsen.crn.data.train.TrainStatus; import de.mrjulsen.crn.data.train.TrainStatus.Registry; @@ -17,8 +15,9 @@ public final class ModTrainStatusInfos { public static final Registry REGISTRY = Registry.create(CreateRailwaysNavigator.MOD_ID); + // TODO Translation keys erst auf dem client übersetzen! // Custom - public static final TrainStatus RED_SIGNAL = REGISTRY.register("red_signal", new TrainStatus(TrainStatusCategory.TRAIN, TrainStatusType.DELAY, (data) -> ELanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".train_status.red_signal"), (data) -> { + public static final TrainStatus RED_SIGNAL = REGISTRY.register("red_signal", new TrainStatus(TrainStatusCategory.TRAIN, TrainStatusType.DELAY, () -> CustomLanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".train_status.red_signal"), (data) -> { return data.isCurrentSectionDelayed() && data.getTrain().navigation.waitingForSignal != null && data.getTrain().navigation.waitingForSignal.getSecond() && @@ -26,49 +25,59 @@ public final class ModTrainStatusInfos { ; })); - public static final TrainStatus PRIORITY_OTHER_TRAIN = REGISTRY.register("priority_other_train", new TrainStatus(TrainStatusCategory.TRAIN, TrainStatusType.DELAY, (data) -> ELanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".train_status.priority_other_train"), (data) -> { + public static final TrainStatus PRIORITY_OTHER_TRAIN = REGISTRY.register("priority_other_train", new TrainStatus(TrainStatusCategory.TRAIN, TrainStatusType.DELAY, () -> CustomLanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".train_status.priority_other_train"), (data) -> { if (!data.isCurrentSectionDelayed() || data.getTrain().navigation.waitingForSignal == null) { return false; } - Optional occupyingTrain = data.occupyingTrains.stream().findFirst(); - if (!occupyingTrain.isPresent()) { + if (data.occupyingTrains.isEmpty()) { return false; } - return TrainListener.data.containsKey(occupyingTrain.get().id) ? !TrainListener.data.get(occupyingTrain.get().id).isDelayed() : false; + Train occupyingTrain = null; + for (Train t : data.occupyingTrains) { + occupyingTrain = t; + break; + } + + return TrainListener.data.containsKey(occupyingTrain.id) ? !TrainListener.data.get(occupyingTrain.id).isDelayed() : false; })); - public static final TrainStatus PERVIOUS_TRAIN_DELAYED = REGISTRY.register("previous_train_delayed", new TrainStatus(TrainStatusCategory.TRAIN, TrainStatusType.DELAY, (data) -> ELanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".train_status.delay_other_train"), (data) -> { + public static final TrainStatus PERVIOUS_TRAIN_DELAYED = REGISTRY.register("previous_train_delayed", new TrainStatus(TrainStatusCategory.TRAIN, TrainStatusType.DELAY, () -> CustomLanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".train_status.delay_other_train"), (data) -> { if (!data.isCurrentSectionDelayed() || data.getTrain().navigation.waitingForSignal == null) { return false; - } + } - Optional occupyingTrain = data.occupyingTrains.stream().findFirst(); - if (!occupyingTrain.isPresent()) { + if (data.occupyingTrains.isEmpty()) { return false; } - return TrainListener.data.containsKey(occupyingTrain.get().id) ? TrainListener.data.get(occupyingTrain.get().id).isDelayed() : false; + Train occupyingTrain = null; + for (Train t : data.occupyingTrains) { + occupyingTrain = t; + break; + } + + return TrainListener.data.containsKey(occupyingTrain.id) ? TrainListener.data.get(occupyingTrain.id).isDelayed() : false; })); - public static final TrainStatus TRACK_CLOSED = REGISTRY.register("track_closed", new TrainStatus(TrainStatusCategory.TRAIN, TrainStatusType.DELAY, (data) -> ELanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".train_status.track_closed"), (data) -> { + public static final TrainStatus TRACK_CLOSED = REGISTRY.register("track_closed", new TrainStatus(TrainStatusCategory.TRAIN, TrainStatusType.DELAY, () -> CustomLanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".train_status.track_closed"), (data) -> { return data.isCurrentSectionDelayed() && ((TrainStatusAccessor)data.getTrain().status).crn$track(); })); - public static final TrainStatus STAFF_SHORTAGE = REGISTRY.register("staff_shortage", new TrainStatus(TrainStatusCategory.TRAIN, TrainStatusType.DELAY, (data) -> ELanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".train_status.staff_shortage"), (data) -> { + public static final TrainStatus STAFF_SHORTAGE = REGISTRY.register("staff_shortage", new TrainStatus(TrainStatusCategory.TRAIN, TrainStatusType.DELAY, () -> CustomLanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".train_status.staff_shortage"), (data) -> { return data.isCurrentSectionDelayed() && ((TrainStatusAccessor)data.getTrain().status).crn$conductor(); })); - public static final TrainStatus OPERATIONAL_DISRUPTION = REGISTRY.register("operational_disruption", new TrainStatus(TrainStatusCategory.TRAIN, TrainStatusType.DELAY, (data) -> ELanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".train_status.operational_disruption"), (data) -> { + public static final TrainStatus OPERATIONAL_DISRUPTION = REGISTRY.register("operational_disruption", new TrainStatus(TrainStatusCategory.TRAIN, TrainStatusType.DELAY, () -> CustomLanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".train_status.operational_disruption"), (data) -> { return data.isCurrentSectionDelayed() && ((TrainStatusAccessor)data.getTrain().status).crn$navigation(); })); - public static final TrainStatus SPECIAL_JOURNEY = REGISTRY.register("special_journey", new TrainStatus(TrainStatusCategory.TRAIN, TrainStatusType.DELAY, (data) -> ELanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".train_status.special_trip"), (data) -> { + public static final TrainStatus SPECIAL_JOURNEY = REGISTRY.register("special_journey", new TrainStatus(TrainStatusCategory.TRAIN, TrainStatusType.DELAY, () -> CustomLanguage.translate("gui." + CreateRailwaysNavigator.MOD_ID + ".train_status.special_trip"), (data) -> { return false; })); - public static final TrainStatus OUT_OF_SERVICE = REGISTRY.register("out_of_service", new TrainStatus(TrainStatusCategory.TRAIN, TrainStatusType.DELAY, (data) -> ELanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.not_in_service"), (data) -> { + public static final TrainStatus OUT_OF_SERVICE = REGISTRY.register("out_of_service", new TrainStatus(TrainStatusCategory.TRAIN, TrainStatusType.DELAY, () -> CustomLanguage.translate("block." + CreateRailwaysNavigator.MOD_ID + ".advanced_display.ber.not_in_service"), (data) -> { return data.isCurrentSectionDelayed() && data.getTrain().runtime.paused; })); diff --git a/common/src/main/java/de/mrjulsen/crn/util/IListenable.java b/common/src/main/java/de/mrjulsen/crn/util/IListenable.java index 09ca49b2..42c8d66a 100644 --- a/common/src/main/java/de/mrjulsen/crn/util/IListenable.java +++ b/common/src/main/java/de/mrjulsen/crn/util/IListenable.java @@ -1,9 +1,10 @@ package de.mrjulsen.crn.util; -import java.util.ArrayList; import java.util.IdentityHashMap; +import java.util.Iterator; import java.util.Map; import java.util.function.Consumer; +import java.util.stream.Collectors; public interface IListenable { @@ -32,7 +33,7 @@ default int eventsCount() { default int listenersCount(String name) { if (!hasEvent(name)) { - throw new IllegalArgumentException("This listener event does not exist: " + name); + throw new IllegalArgumentException("This listener event does not exist: " + name + ". Valid events are: [" + getListeners().keySet().stream().collect(Collectors.joining(", ")) + "]"); } return getListeners().get(name).size(); @@ -44,7 +45,7 @@ default boolean hasEvent(String name) { default void listen(String name, Object listenerObject, Consumer listener) { if (!hasEvent(name)) { - throw new IllegalArgumentException("This listener event does not exist: " + name); + throw new IllegalArgumentException("This listener event does not exist: " + name + ". Valid events are: [" + getListeners().keySet().stream().collect(Collectors.joining(", ")) + "]"); } getListeners().get(name).put(listenerObject, listener); @@ -52,25 +53,30 @@ default void listen(String name, Object listenerObject, Consumer listener) { default void stopListening(String name, Object listenerObject) { if (!hasEvent(name)) { - throw new IllegalArgumentException("This listener event does not exist: " + name); + throw new IllegalArgumentException("This listener event does not exist: " + name + ". Valid events are: [" + getListeners().keySet().stream().collect(Collectors.joining(", ")) + "]"); } getListeners().get(name).remove(listenerObject); } - default void stopListeningAll(Object listenerObject) { - getListeners().values().stream().forEach(x -> { + default void stopListeningAll(Object listenerObject) { + Iterator>> iterator = getListeners().values().iterator(); + while (iterator.hasNext()) { + Map> x = iterator.next(); if (x.containsKey(listenerObject)) { - x.remove(listenerObject); + iterator.remove(); } - }); + } } default void notifyListeners(String name, T data) { if (!hasEvent(name)) { - throw new IllegalArgumentException("This listener event does not exist: " + name); + throw new IllegalArgumentException("This listener event does not exist: " + name + ". Valid events are: [" + getListeners().keySet().stream().collect(Collectors.joining(", ")) + "]"); } - new ArrayList<>(getListeners().get(name).values()).stream().forEach(x -> x.accept(data)); + Iterator> iterator = getListeners().get(name).values().iterator(); + while (iterator.hasNext()) { + iterator.next().accept(data); + } } } diff --git a/common/src/main/java/de/mrjulsen/crn/util/ModUtils.java b/common/src/main/java/de/mrjulsen/crn/util/ModUtils.java index 84673a5d..7508b277 100644 --- a/common/src/main/java/de/mrjulsen/crn/util/ModUtils.java +++ b/common/src/main/java/de/mrjulsen/crn/util/ModUtils.java @@ -1,5 +1,6 @@ package de.mrjulsen.crn.util; +import java.util.Arrays; import java.util.Collections; import java.util.LinkedList; import java.util.List; @@ -10,25 +11,27 @@ import de.mrjulsen.crn.config.ModClientConfig; import de.mrjulsen.crn.exceptions.RuntimeSideException; -import de.mrjulsen.crn.web.WebsitePreparableReloadListener; import de.mrjulsen.mcdragonlib.DragonLib; +import de.mrjulsen.mcdragonlib.config.ECachingPriority; +import de.mrjulsen.mcdragonlib.data.Cache; import de.mrjulsen.mcdragonlib.util.TextUtils; import de.mrjulsen.mcdragonlib.util.TimeUtils; import dev.architectury.platform.Platform; import dev.architectury.utils.Env; import net.minecraft.network.chat.MutableComponent; import net.minecraft.util.Mth; +import net.minecraft.world.item.DyeColor; public class ModUtils { - private static WebsitePreparableReloadListener websitemanager; + private static final Cache dyeColorsCache = new Cache<>(() -> Arrays.stream(DyeColor.values()).mapToInt(x -> x == DyeColor.ORANGE ? 0xFFFF9900 : (0xFF << 24) | (x.getTextColor() & 0x00FFFFFF)).toArray(), ECachingPriority.LOW); public static float clockHandDegrees(long time, int divisor) { return 360.0F / divisor * (time % divisor); } public static double calcSpeed(double metersPerTick, ESpeedUnit unit) { - return metersPerTick * DragonLib.TPS * unit.getFactor(); + return metersPerTick * 20 * unit.getFactor(); // TODO: DragonLib minecraftTps() for the game tick rate } public static MutableComponent calcSpeedString(double metersPerTick, ESpeedUnit unit) { @@ -94,14 +97,6 @@ public static long generateId(Predicate exists) { return id; } - public static void setWebsiteResourceManager(WebsitePreparableReloadListener manager) { - websitemanager = manager; - } - - public static WebsitePreparableReloadListener getWebsiteResourceManager() { - return websitemanager; - } - /** Client-side only! */ public static String formatTime(long time, boolean asETA) throws RuntimeSideException { if (Platform.getEnvironment() != Env.CLIENT) { @@ -110,6 +105,10 @@ public static String formatTime(long time, boolean asETA) throws RuntimeSideExce if (asETA) { return timeRemainingString(time - DragonLib.getCurrentWorldTime()); } - return TimeUtils.parseTime((time + DragonLib.DAYTIME_SHIFT) % DragonLib.TICKS_PER_DAY, ModClientConfig.TIME_FORMAT.get()); + return TimeUtils.parseTime((time + DragonLib.daytimeShift()) % DragonLib.ticksPerDay(), ModClientConfig.TIME_FORMAT.get()); + } + + public static int[] getDyeColors() { + return dyeColorsCache.get(); } } diff --git a/common/src/main/java/de/mrjulsen/crn/web/SimpleWebServer.java b/common/src/main/java/de/mrjulsen/crn/web/SimpleWebServer.java deleted file mode 100644 index 82812505..00000000 --- a/common/src/main/java/de/mrjulsen/crn/web/SimpleWebServer.java +++ /dev/null @@ -1,274 +0,0 @@ -package de.mrjulsen.crn.web; - -import java.util.Map; -import java.util.Optional; -import java.util.TreeMap; -import java.util.Collections; -import java.util.LinkedList; -import java.util.List; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; - -import de.mrjulsen.crn.CreateRailwaysNavigator; -import de.mrjulsen.crn.util.ModUtils; -import de.mrjulsen.crn.data.storage.GlobalSettings; -import de.mrjulsen.crn.event.ModCommonEvents; -import de.mrjulsen.crn.data.navigation.NavigatableGraph; -import de.mrjulsen.crn.data.navigation.Route; -import de.mrjulsen.mcdragonlib.DragonLib; -import de.mrjulsen.mcdragonlib.util.DLUtils; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.packs.PackType; - -import com.sun.net.httpserver.HttpHandler; -import com.sun.net.httpserver.HttpServer; -import com.sun.net.httpserver.HttpsServer; -import com.google.common.net.MediaType; -import com.sun.net.httpserver.HttpExchange; - -import java.io.OutputStream; -import java.io.UnsupportedEncodingException; -import java.io.IOException; -import java.net.HttpURLConnection; -import java.net.URI; -import java.net.URISyntaxException; -import java.net.URLDecoder; - -public class SimpleWebServer { - - static HttpServer server; - - public static void start() throws Exception { - /* - server = HttpServer.create(new InetSocketAddress(80), 0); - server.createContext("/hello", new HelloWorldHandler()); - server.createContext("/api/" + CreateRailwaysNavigator.MOD_ID + "/navigate", new V1NavigationHandler()); - server.createContext("/" + CreateRailwaysNavigator.MOD_ID, new WebsiteHandler(CreateRailwaysNavigator.MOD_ID)); - server.createContext("/" + CreateRailwaysNavigator.SHORT_MOD_ID, new WebsiteHandler(CreateRailwaysNavigator.SHORT_MOD_ID)); - server.createContext("/status", new TestHandler()); - server.setExecutor(null); // creates a default executor - server.start(); - */ - } - - public static void stop() { - DLUtils.doIfNotNull(server, x -> { - x.stop(0); - }); - } - - public static Map> parseQueryParameters(HttpExchange ex, Charset charset) { - String queryString = ex.getRequestURI().getRawQuery(); - if (queryString == null || queryString.isEmpty()) { - return Collections.emptyMap(); - } - Map> parsedParams = new TreeMap>(); - for (String param : queryString.split("&")) { - String[] parts = param.split("=", 2); - String key = parts[0]; - String value = parts.length == 2 ? parts[1] : ""; - try { - key = URLDecoder.decode(key, charset.name()); - value = URLDecoder.decode(value, charset.name()); - } catch (UnsupportedEncodingException e) { - throw new AssertionError(e); - } - List values = parsedParams.get(key); - if (values == null) { - values = new LinkedList(); - parsedParams.put(key, values); - } - values.add(value); - } - - for (Map.Entry> me : parsedParams.entrySet()) { - me.setValue(Collections.unmodifiableList(me.getValue())); - } - return Collections.unmodifiableMap(parsedParams); - } - - private static void startResponse(HttpExchange ex, int code, MediaType contentType, boolean hasBody) throws IOException { - if (contentType != null) { - ex.getResponseHeaders().set("Content-Type", contentType.type()); - } - if (!hasBody) { // No body. Required for HEAD requests - ex.sendResponseHeaders(code, -1); - } else { // Chuncked encoding - ex.sendResponseHeaders(code, 0); - } - } - - private static void sendError(HttpExchange ex, int code, String msg) { - CreateRailwaysNavigator.LOGGER.warn(msg); - try { - respond(ex, code, MediaType.PLAIN_TEXT_UTF_8, msg.getBytes()); - } catch (IOException e) { - CreateRailwaysNavigator.LOGGER.error("Unable to send error response.", e); - } - } - - private static void respond(HttpExchange ex, int code, MediaType contentType, byte response[]) throws IOException { - startResponse(ex, code, contentType, response != null); - if (response != null) { - OutputStream responseBody = ex.getResponseBody(); - responseBody.write(response); - responseBody.flush(); - responseBody.close(); - } - ex.close(); - } - - public static void sendRedirect(HttpExchange ex, URI location) throws IOException { - ex.getResponseHeaders().set("Location", location.toString()); - respond(ex, HttpURLConnection.HTTP_SEE_OTHER, null, null); - } - - public static URI getRequestUri(HttpExchange ex) { - String host = ex.getRequestHeaders().getFirst("Host"); - if (host == null) { // Client must be using HTTP/1.0 - CreateRailwaysNavigator.LOGGER.warn("Request did not provide Host header, using 'localhost' as hostname"); - int port = ex.getHttpContext().getServer().getAddress().getPort(); - host = "localhost:" + port; - } - String protocol = (ex.getHttpContext().getServer() instanceof HttpsServer) ? "https" : "http"; - URI base; - try { - base = new URI(protocol, host, "/", null, null); - } catch (URISyntaxException e) { - throw new IllegalStateException(e); - } - URI requestedUri = ex.getRequestURI(); - requestedUri = base.resolve(requestedUri); - return requestedUri; - } - - public static void redirectTo(HttpExchange ex, String redirect) { - URI base = getRequestUri(ex); - URI path; - try { - path = new URI(redirect); - sendRedirect(ex, base.resolve(path)); - } catch (URISyntaxException | IOException e) { - CreateRailwaysNavigator.LOGGER.error("Could not construct URI.", e); - } - } - - - - static class HelloWorldHandler implements HttpHandler { - - @Override - public void handle(HttpExchange t) throws IOException { - String response = "Hello World! " + CreateRailwaysNavigator.MOD_ID; - t.sendResponseHeaders(200, response.length()); - OutputStream os = t.getResponseBody(); - os.write(response.getBytes()); - os.close(); - } - } - - static class WebsiteHandler implements HttpHandler { - - private final String subUrl; - private final int subUrlLength; - - public WebsiteHandler(String subUrl) { - this.subUrl = subUrl; - this.subUrlLength = subUrl.length() + 1; - } - - @Override - public void handle(HttpExchange t) throws IOException { - - String requestedPath = t.getRequestURI().getPath(); - if (requestedPath.startsWith("/" + subUrl) && requestedPath.length() >= subUrlLength) { - requestedPath = requestedPath.substring(subUrlLength); - } else { - sendError(t, HttpURLConnection.HTTP_BAD_REQUEST, "The requested URL is invalid: " + requestedPath); - } - - if (requestedPath.isBlank()) { - redirectTo(t, "/" + subUrl + "/"); - return; - } - - if (requestedPath.equals("/")) { - requestedPath = "/index.html"; // Set default page to index.html - } - - CreateRailwaysNavigator.LOGGER.info("A web service requested a resource: " + requestedPath); - Optional fileData = ModUtils.getWebsiteResourceManager().getFileBytesFor(requestedPath); - - if (!fileData.isPresent()) { - sendError(t, HttpURLConnection.HTTP_NOT_FOUND, "The requested resource does not exist: " + requestedPath); - /* - String response = "404 (Not Found)\n" + requestedPath + " does not exist."; - t.sendResponseHeaders(404, response.length()); - OutputStream os = t.getResponseBody(); - os.write(response.getBytes()); - os.close(); - */ - } else { - respond(t, HttpURLConnection.HTTP_OK, null, fileData.get()); - /* - byte[] fileBytes = fileData.get(); - System.out.println("BYTES: " + fileBytes.length); - t.sendResponseHeaders(200, 0); - OutputStream os = t.getResponseBody(); - os.write(fileBytes); - os.close(); - */ - } - } - } - - static class TestHandler implements HttpHandler { - @Override - public void handle(HttpExchange t) throws IOException { - String response = "PACKS"; - for (String str : ModCommonEvents.getCurrentServer().get().getPackRepository().getAvailableIds()) { - response += "\n - " + str; - } - response += "\nCRN PACK"; - for (ResourceLocation str : ModCommonEvents.getCurrentServer().get().getPackRepository().getPack("mod:" + CreateRailwaysNavigator.MOD_ID).open().getResources(PackType.SERVER_DATA, CreateRailwaysNavigator.MOD_ID, "", (str) -> true)) { - response += "\n - " + str; - } - t.sendResponseHeaders(200, response.length()); - OutputStream os = t.getResponseBody(); - os.write(response.getBytes()); - os.close(); - } - } - - static class V1NavigationHandler implements HttpHandler { - - private static final String KEY_START = "start"; - private static final String KEY_DESTINATION = "destination"; - - @Override - public void handle(HttpExchange t) throws IOException { - Map> params = parseQueryParameters(t, StandardCharsets.UTF_8); - - if (!params.containsKey(KEY_START) || !params.containsKey(KEY_DESTINATION)) { - sendError(t, HttpURLConnection.HTTP_BAD_REQUEST, "Wrong parameters."); - } - - try { - - GlobalSettings settings = GlobalSettings.getInstance(); - List routes = NavigatableGraph.searchRoutes(settings.getOrCreateStationTagFor(params.get(KEY_START).get(0)), settings.getOrCreateStationTagFor(params.get(KEY_DESTINATION).get(0)), null, true); - String response = DragonLib.GSON.toJson(routes); - - t.sendResponseHeaders(200, 0); - OutputStream os = t.getResponseBody(); - os.write(response.getBytes()); - os.close(); - - } catch (Exception e) { - CreateRailwaysNavigator.LOGGER.error("DEAD", e); - } - - - } - } -} diff --git a/common/src/main/java/de/mrjulsen/crn/web/WebsitePreparableReloadListener.java b/common/src/main/java/de/mrjulsen/crn/web/WebsitePreparableReloadListener.java deleted file mode 100644 index cd2b0086..00000000 --- a/common/src/main/java/de/mrjulsen/crn/web/WebsitePreparableReloadListener.java +++ /dev/null @@ -1,57 +0,0 @@ -package de.mrjulsen.crn.web; - -import java.io.IOException; -import java.io.InputStream; -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; -import java.util.Optional; -import java.util.function.Supplier; - -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.packs.resources.Resource; -import net.minecraft.server.packs.resources.ResourceManager; -import net.minecraft.server.packs.resources.SimplePreparableReloadListener; -import net.minecraft.util.profiling.ProfilerFiller; - -public class WebsitePreparableReloadListener extends SimplePreparableReloadListener>> { - - public static final String RESOURCE_PATH = "crn_website"; - - private Map> data; - - @Override - protected void apply(Map> object, ResourceManager resourceManager, ProfilerFiller profiler) { - data = object; - } - - @Override - protected Map> prepare(ResourceManager resourceManager, ProfilerFiller profiler) { - - Map> map = new HashMap<>(); - Collection locations = resourceManager.listResources(RESOURCE_PATH, x -> true).keySet(); - - for (ResourceLocation loc : locations) { - final ResourceLocation localLoc = loc; - String path = localLoc.getPath().replace(RESOURCE_PATH, ""); - map.put(path, () -> { - try { - Resource resource = resourceManager.getResourceOrThrow(localLoc); - try (InputStream inputstream = resource.open()) { - return inputstream.readAllBytes(); - } - } catch (IOException e) { - e.printStackTrace(); - return null; - } - }); - } - - return map; - } - - public Optional getFileBytesFor(String path) { - return Optional.ofNullable(data.containsKey(path) ? data.get(path).get() : null); - } - -} diff --git a/common/src/main/resources/assets/createrailwaysnavigator/lang/bar.json b/common/src/main/resources/assets/createrailwaysnavigator/lang/bar.json index 9d9aea12..782a8124 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/lang/bar.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/lang/bar.json @@ -3,56 +3,45 @@ "advancement.createrailwaysnavigator.navigator.description": "Stelle oan Navi her, um Zugverbindungen zwischn zwoa verschiedenen Bahnhöfen zu fina.", "advancement.createrailwaysnavigator.advanced_display": "Ned gonz 4k", "advancement.createrailwaysnavigator.advanced_display.description": "Verbessere dei Anzeigetafel, um meahr Informationen darzustäin und sie sogar af Zügen zu verwenden.", - - "itemGroup.createrailwaysnavigator.tab": "Create Railways Navigator", - - "item.createrailwaysnavigator.navigator": "Create Railways Navigator", - "item.createrailwaysnavigator.navigator.tooltip.summary": "Dea _Navigator_ zoagts mögliche _Zugverbindungen_ mid zusätzlichen Informationen, wia _Zwischenhoit_, _Echtzeitdaten_ und meahr.", - + "item.createrailwaysnavigator.navigator.tooltip.summary": "Dea _Navigator_ zoagts mögliche _Zugverbindungen_ mid zusätzlichen Informationen, wia _Zwischenhoit_, _Echtzeitdaten_ und meahr.", "block.createrailwaysnavigator.train_station_clock": "Bahnhofsuhr", "block.createrailwaysnavigator.advanced_display_block": "Verbesserter Anzeige-Block", - "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "Benutze den Block af _Zügen_ ois _Zugzielanzeigen_ oda _Fahrgastinformationsanzeigen_ oda an _Bahnhöfen_ ois verbesserte _Bahnsteiganzeigen_, de a meahr Informationen anzeigen ois normale Anzeigetafeln.", + "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "Benutze den Block af _Zügen_ ois _Zugzielanzeigen_ oda _Fahrgastinformationsanzeigen_ oda an _Bahnhöfen_ ois verbesserte _Bahnsteiganzeigen_, de a meahr Informationen anzeigen ois normale Anzeigetafeln.", "block.createrailwaysnavigator.advanced_display_block.tooltip.condition1": "R-Klick mid am Schraubenschlüssel", - "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "Öffne a _Menü_, um de Anzeige zu _konfigurieren_.", + "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "Öffne a _Menü_, um de Anzeige zu _konfigurieren_.", "block.createrailwaysnavigator.advanced_display": "Verbesserte Anzeigetafel", - "block.createrailwaysnavigator.advanced_display.tooltip.summary": "Benutze den Block af _Zügen_ ois _Zugzielanzeigen_ oda _Fahrgastinformationsanzeigen_ oda an _Bahnhöfen_ ois verbesserte _Bahnsteiganzeigen_, de a meahr Informationen anzeigen ois normale Anzeigetafeln.", + "block.createrailwaysnavigator.advanced_display.tooltip.summary": "Benutze den Block af _Zügen_ ois _Zugzielanzeigen_ oda _Fahrgastinformationsanzeigen_ oda an _Bahnhöfen_ ois verbesserte _Bahnsteiganzeigen_, de a meahr Informationen anzeigen ois normale Anzeigetafeln.", "block.createrailwaysnavigator.advanced_display.tooltip.condition1": "R-Klick mid am Schraubenschlüssel", - "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "Öffne a _Menü_, um de Anzeige zu _konfigurieren_.", + "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "Öffne a _Menü_, um de Anzeige zu _konfigurieren_.", "block.createrailwaysnavigator.advanced_display_small": "Kleine verbesserte Anzeigetafel", - "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "Benutze den Block af _Zügen_ ois _Zugzielanzeigen_ oda _Fahrgastinformationsanzeigen_ oda an _Bahnhöfen_ ois verbesserte _Bahnsteiganzeigen_, de a meahr Informationen anzeigen ois normale Anzeigetafeln.", + "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "Benutze den Block af _Zügen_ ois _Zugzielanzeigen_ oda _Fahrgastinformationsanzeigen_ oda an _Bahnhöfen_ ois verbesserte _Bahnsteiganzeigen_, de a meahr Informationen anzeigen ois normale Anzeigetafeln.", "block.createrailwaysnavigator.advanced_display_small.tooltip.condition1": "R-Klick mid am Schraubenschlüssel", - "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "Öffne a _Menü_, um de Anzeige zu _konfigurieren_.", + "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "Öffne a _Menü_, um de Anzeige zu _konfigurieren_.", "block.createrailwaysnavigator.advanced_display_panel": "Verbessertes Anzeigepanel", - "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "Benutze den Block af _Zügen_ ois _Zugzielanzeigen_ oda _Fahrgastinformationsanzeigen_ oda an _Bahnhöfen_ ois verbesserte _Bahnsteiganzeigen_, de a meahr Informationen anzeigen ois normale Anzeigetafeln.", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "Benutze den Block af _Zügen_ ois _Zugzielanzeigen_ oda _Fahrgastinformationsanzeigen_ oda an _Bahnhöfen_ ois verbesserte _Bahnsteiganzeigen_, de a meahr Informationen anzeigen ois normale Anzeigetafeln.", "block.createrailwaysnavigator.advanced_display_panel.tooltip.condition1": "R-Klick mid am Schraubenschlüssel", - "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "Öffne a _Menü_, um de Anzeige zu _konfigurieren_.", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "Öffne a _Menü_, um de Anzeige zu _konfigurieren_.", "block.createrailwaysnavigator.advanced_display_half_panel": "Hoibs Vabesserts Ozeigpanl", - "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "Benutze den Block af _Zügen_ ois _Zugzielanzeigen_ oda _Fahrgastinformationsanzeigen_ oda an _Bahnhöfen_ ois verbesserte _Bahnsteiganzeigen_, de a meahr Informationen anzeigen ois normale Anzeigetafeln.", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "Benutze den Block af _Zügen_ ois _Zugzielanzeigen_ oda _Fahrgastinformationsanzeigen_ oda an _Bahnhöfen_ ois verbesserte _Bahnsteiganzeigen_, de a meahr Informationen anzeigen ois normale Anzeigetafeln.", "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.condition1": "R-Klick mid am Schraubenschlüssel", - "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "Öffne a _Menü_, um de Anzeige zu _konfigurieren_.", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "Öffne a _Menü_, um de Anzeige zu _konfigurieren_.", "block.createrailwaysnavigator.advanced_display_sloped": "Abgeschrägte Verbesserte Anzeigetafel", - "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "Benutze den Block af _Zügen_ ois _Zugzielanzeigen_ oda _Fahrgastinformationsanzeigen_ oda an _Bahnhöfen_ ois verbesserte _Bahnsteiganzeigen_, de a meahr Informationen anzeigen ois normale Anzeigetafeln.", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "Benutze den Block af _Zügen_ ois _Zugzielanzeigen_ oda _Fahrgastinformationsanzeigen_ oda an _Bahnhöfen_ ois verbesserte _Bahnsteiganzeigen_, de a meahr Informationen anzeigen ois normale Anzeigetafeln.", "block.createrailwaysnavigator.advanced_display_sloped.tooltip.condition1": "R-Klick mid am Schraubenschlüssel", - "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "Öffne a _Menü_, um de Anzeige zu _konfigurieren_.", - + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "Öffne a _Menü_, um de Anzeige zu _konfigurieren_.", "block.createrailwaysnavigator.advanced_display.ber.not_in_service": "Betriebsfahrt", - - "category.createrailwaysnavigator.crn": "Create Railways Navigator", "key.createrailwaysnavigator.route_overlay_options": "Routenanzeig Einstäiunga", - "enum.createrailwaysnavigator.overlay_position": "Ozeigposition", "enum.createrailwaysnavigator.overlay_position.info.top_left": "Ecke om links", "enum.createrailwaysnavigator.overlay_position.info.top_right": "Ecke om rechts", "enum.createrailwaysnavigator.overlay_position.info.bottom_left": "Ecke undn links", "enum.createrailwaysnavigator.overlay_position.info.bottom_right": "Ecke undn rechts", - "gui.createrailwaysnavigator.loading.title": "Dadn wern herunterglon...", - "gui.createrailwaysnavigator.overlay_settings.title": "Routenanzeig Einstäiunga", "gui.createrailwaysnavigator.route_overlay_settings.show_details": "Details ozeign", "gui.createrailwaysnavigator.route_overlay_settings.unpin": "Ozeig entferna", "gui.createrailwaysnavigator.route_overlay_settings.narrator.on": "Eazählerankündigunga aktiviad.", - "gui.createrailwaysnavigator.route_overlay_settings.narrator.off": "Eazählerankündigunga deaktiviad.", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.off": "Eazählerankündigunga deaktiviad.", "gui.createrailwaysnavigator.route_overlay_settings.notifications.on": "Benachrichtigunga aktiviad.", "gui.createrailwaysnavigator.route_overlay_settings.notifications.off": "Benachrichtigunga deaktiviad.", "gui.createrailwaysnavigator.route_overlay_settings.scale": "Benutzeroberflächenskaliarung", @@ -60,7 +49,6 @@ "gui.createrailwaysnavigator.route_overlay_settings.narrator.description": "Da Eazähla kündigt wichtig Eaeignisse auf doana Route an, z.B. da naxte Hoid.", "gui.createrailwaysnavigator.route_overlay_settings.notifications": "Benachrichtigunga", "gui.createrailwaysnavigator.route_overlay_settings.notifications.description": "Eahoide Benachrichtigunga in Form vo Pop-Ups zua wichtign Eaeignisse, z.B. Vaspätunga", - "gui.createrailwaysnavigator.common.expand": "Details ozeign", "gui.createrailwaysnavigator.common.collapse": "Details vabeagn", "gui.createrailwaysnavigator.common.go_back": "Zrugg", @@ -72,9 +60,6 @@ "gui.createrailwaysnavigator.common.search": "Suchn", "gui.createrailwaysnavigator.common.auto": "Autom.", "gui.createrailwaysnavigator.common.server_error": "Fehla beim Ausführn da Aufgob. Schaue in de Servakonsole.", - "gui.createrailwaysnavigator.via": "üba", - - "gui.createrailwaysnavigator.navigator.title": "Create Railways Navigator", "gui.createrailwaysnavigator.navigator.no_connections": "Koa Vabindungn gfundn.", "gui.createrailwaysnavigator.navigator.not_searched": "Bisha nix gsucht.", "gui.createrailwaysnavigator.navigator.searching": "Suach noch Vabindungn...", @@ -89,13 +74,10 @@ "gui.createrailwaysnavigator.navigator.search.tooltip": "Suchn", "gui.createrailwaysnavigator.navigator.location.tooltip": "Nächsglegne Station vo aktuella Position", "gui.createrailwaysnavigator.navigator.switch.tooltip": "Eingobn tauschn", - "gui.createrailwaysnavigator.route_details.title": "Streckendtails", "gui.createrailwaysnavigator.route_details.departure": "Obfahrt in", "gui.createrailwaysnavigator.route_details.next_transfer_time": "Umstieg in", "gui.createrailwaysnavigator.route_details.transfer": "Umstieg", - "gui.createrailwaysnavigator.route_details.save_route": "Route speichern", - "gui.createrailwaysnavigator.route_overview.title": "Streckendtails", "gui.createrailwaysnavigator.route_overview.journey_begins": "Ihre Reise ofangt! %s noch %s, Obfahrt %s", "gui.createrailwaysnavigator.route_overview.journey_begins_with_platform": "Ihre Reise ofangt! %s noch %s, Obfahrt %s vo Gleis %s", @@ -138,7 +120,6 @@ "gui.createrailwaysnavigator.route_overview.notification.journey_completed.title": "Sie hom Ihr Zil eareicht!", "gui.createrailwaysnavigator.route_overview.notification.journey_completed": "Mia bedankn uns fia Ihre Reise und wünschn oan scheenen Dog.", "gui.createrailwaysnavigator.route_overview.date": "Dog %s, %s", - "gui.createrailwaysnavigator.global_settings.title": "Globale Einstäiunga", "gui.createrailwaysnavigator.global_settings.option.tooltip": "Zum Bearbadn klickn", "gui.createrailwaysnavigator.global_settings.option_alias.title": "Bohhof Dogs", @@ -149,8 +130,6 @@ "gui.createrailwaysnavigator.global_settings.train_group.description": "Zuagkategorin deann da Organisation vo Zügn (z.B. Regionalvakeah, Feanvakeah, ...). Nutza könna noch desn Kategorin filtern.", "gui.createrailwaysnavigator.global_settings.train_blacklist.title": "Zuag Blacklist", "gui.createrailwaysnavigator.global_settings.train_blacklist.description": "Schliaße Züg aus, z.B. Güterzüg, Sonderzüg, etc., damit de ned in den Vorschlägn auftaan.", - - "gui.createrailwaysnavigator.station_tags.title": "Bohhof Dogs Einstäiunga", "gui.createrailwaysnavigator.station_tags.summary": "Enthält %s Stationa", "gui.createrailwaysnavigator.station_tags.editor": "Zualetzt vo %s am %s bearbadet", "gui.createrailwaysnavigator.station_tags.add.tooltip": "Nein Eintrog eastäin", @@ -160,22 +139,18 @@ "gui.createrailwaysnavigator.station_tags.hint.station_name": "Bohhofsnama", "gui.createrailwaysnavigator.station_tags.hint.platform": "Gleisbezeichnung", "gui.createrailwaysnavigator.station_tags.enter_name": "Nama eingem", - "gui.createrailwaysnavigator.train_group_settings.title": "Zuagkategorin Einstäiunga", "gui.createrailwaysnavigator.train_group_settings.summary": "Enthält %s Ziag", "gui.createrailwaysnavigator.train_group_settings.editor": "Zualetzt vo %s am %s bearbadet", "gui.createrailwaysnavigator.train_group_settings.delete_alias.tooltip": "Kategorie löschn", "gui.createrailwaysnavigator.train_group_settings.delete_station.tooltip": "Zuag entferna", "gui.createrailwaysnavigator.train_group_settings.add_station.tooltip": "Zuag hizufügn", - "gui.createrailwaysnavigator.blacklist.title": "Bohhof Blacklist", "gui.createrailwaysnavigator.blacklist.add.tooltip": "Zua Blacklist hizufügn", "gui.createrailwaysnavigator.blacklist.delete.tooltip": "Vo Blacklist entferna", - "gui.createrailwaysnavigator.train_blacklist.title": "Zuag Blacklist", "gui.createrailwaysnavigator.train_blacklist.add.tooltip": "Zua Blacklist hizufügn", "gui.createrailwaysnavigator.train_blacklist.delete.tooltip": "Vo Blacklist entferna", - "gui.createrailwaysnavigator.search_settings.title": "Sucheinstäiunga", "gui.createrailwaysnavigator.search_settings.transfer_time": "Minimale Umstiegszeid", "gui.createrailwaysnavigator.search_settings.transfer_time.description": "De minimale Zeid fia oan Umstieg. (1h ~ 50 Reoi Life Sekundn)", @@ -185,28 +160,23 @@ "gui.createrailwaysnavigator.search_settings.train_groups.overview.all": "Olle", "gui.createrailwaysnavigator.search_settings.train_groups.overview.none": "Koa", "gui.createrailwaysnavigator.search_settings.train_groups.tooltip.reset": "Filta zuaruggsetzn", - "gui.createrailwaysnavigator.new_text_entry.add.tooltip": "Hizufügn", - "gui.createrailwaysnavigator.time": "Zeid: %s", "gui.createrailwaysnavigator.time.now": "'etz", "gui.createrailwaysnavigator.time_format.dhm": "%s Doge %s Std. %s min.", "gui.createrailwaysnavigator.time_format.hm": "%s Std. %s min.", - "gui.createrailwaysnavigator.time_format.m": "%s min.", - "gui.createrailwaysnavigator.platform": "Gleis", "gui.createrailwaysnavigator.departure": "Obfahrt", "gui.createrailwaysnavigator.destination": "Zil", "gui.createrailwaysnavigator.line": "Linie", "gui.createrailwaysnavigator.following_trains": "Foigezüg:", - + "gui.createrailwaysnavigator.via": "üba", "gui.createrailwaysnavigator.advanced_display_settings.title": "Vabesserte Ozeig Einstäiunga", "gui.createrailwaysnavigator.advanced_display_settings.display_type": "Ozeigtyp", "gui.createrailwaysnavigator.advanced_display_settings.display_type.description": "De Informadiona, de ozoagd wern soin.", "gui.createrailwaysnavigator.advanced_display_settings.info_type": "Informadionsart", "gui.createrailwaysnavigator.advanced_display_settings.info_type.description": "Gibt an, wia detailliad de Informadiona san.", "gui.createrailwaysnavigator.advanced_display_settings.double_sided": "Beidseitig", - "enum.createrailwaysnavigator.display_info_type": "Informadionsart", "enum.createrailwaysnavigator.display_info_type.description": "Gibt an, wia vui Informadiona dargstäit wern soin.", "enum.createrailwaysnavigator.display_info_type.simple": "Oafach", @@ -215,7 +185,6 @@ "enum.createrailwaysnavigator.display_info_type.info.detailed": "De wichtigsdn Informadiona mid einign Details, wia z.B Zwischenhoide.", "enum.createrailwaysnavigator.display_info_type.informative": "Informadiv", "enum.createrailwaysnavigator.display_info_type.info.informative": "Zeigt olle Informadiona, de relevant sei könna, und stäit sie möglichst oschaulich dar. Ned fia gloae Ozeign empfohln.", - "enum.createrailwaysnavigator.display_type": "Ozeigtyp", "enum.createrailwaysnavigator.display_type.description": "De Art da Ozeig, wos vo ihrem Zweck obhängt.", "enum.createrailwaysnavigator.display_type.train_destination": "Zuagzielanzeig", @@ -224,26 +193,20 @@ "enum.createrailwaysnavigator.display_type.info.passenger_information": "Repräsentiern de Ozeign, de in Zügn vorkomma. Dargstäit wern da naxte Hoid, de Ausstiegsseitn und (je noch Einstäiung) no weidere Informadiona.", "enum.createrailwaysnavigator.display_type.platform": "Bohsteiganzeig", "enum.createrailwaysnavigator.display_type.info.platform": "De Ozeign wern an Bohsteign vawendt und zeign de naxtn obfahrendn Züg mid zuasätzlichn Informadiona an. Funktioniad ned auf Zügn!", - "enum.createrailwaysnavigator.side": "Seitn", "enum.createrailwaysnavigator.side.description": "De Seitn des Bloggs, auf am de Informadiona ozoagd wern soin.", "enum.createrailwaysnavigator.side.front": "Voadaseitn", "enum.createrailwaysnavigator.side.info.front": "De Informadiona wern grod auf da Voadaseitn dargstäit.", "enum.createrailwaysnavigator.side.both": "Beidseitig", "enum.createrailwaysnavigator.side.info.both": "De Informadiona wern auf beidn Seitn dargstäit.", - "enum.createrailwaysnavigator.time_display": "Zeidanzeig", "enum.createrailwaysnavigator.time_display.description": "Gibt an, in welchem Formad de Zeid oggm werd.", - "enum.createrailwaysnavigator.time_display.abs": "ABS", "enum.createrailwaysnavigator.time_display.info.abs": "ABS (Obsolut)", - "enum.createrailwaysnavigator.time_display.eta": "ETA", "enum.createrailwaysnavigator.time_display.info.eta": "ETA (Gschätzte Okunftszeid)", - "create.display_source.advanced_display": "Vabesserte Ozeig", "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width": "Zuagnama Spoidenbreadn", "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description": "De Breadn da Spoide fia den Zuagnama in Pixl. (Standard: 16)", "gui.createrailwaysnavigator.display_source.advanced_display.platform_width": "Gleis Spoidenbreadn", "gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description": "De Breadn da Spoide fia des Gleis in Pixl. (-1 = Autom., Standard: -1)", - - "createrailwaysnavigator.moin": "Servus" + "gui.createrailwaysnavigator.station_tags.title": "Bohhof Dogs Einstäiunga" } diff --git a/common/src/main/resources/assets/createrailwaysnavigator/lang/de_de.json b/common/src/main/resources/assets/createrailwaysnavigator/lang/de_de.json index e690d6a3..5765e4d8 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/lang/de_de.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/lang/de_de.json @@ -74,11 +74,16 @@ "gui.createrailwaysnavigator.common.true": "Ja", "gui.createrailwaysnavigator.common.false": "Nein", "gui.createrailwaysnavigator.common.search": "Suchen", - "gui.createrailwaysnavigator.common.auto": "Autom.", + "gui.createrailwaysnavigator.common.auto": "Auto", + "gui.createrailwaysnavigator.common.max": "Max", "gui.createrailwaysnavigator.common.server_error": "Fehler beim Ausführen der Aufgabe. Schaue in die Serverkonsole.", "gui.createrailwaysnavigator.common.delete": "Löschen", "gui.createrailwaysnavigator.common.add": "Hinzufügen", "gui.createrailwaysnavigator.common.help": "Hilfe erhalten", + "gui.createrailwaysnavigator.common.copy": "Kopieren", + "gui.createrailwaysnavigator.common.paste": "Einfügen", + "gui.createrailwaysnavigator.common.click_to_search": "Klicke zum Durchsuchen", + "gui.createrailwaysnavigator.common.click_to_edit": "Klicke zum Bearbeiten", "gui.createrailwaysnavigator.navigator.title": "Create Railways Navigator", "gui.createrailwaysnavigator.navigator.no_connections": "Keine Verbindungen gefunden.", @@ -93,12 +98,13 @@ "gui.createrailwaysnavigator.navigator.global_settings.tooltip": "Globale Einstellungen", "gui.createrailwaysnavigator.navigator.search_settings.tooltip": "Sucheinstellungen", "gui.createrailwaysnavigator.navigator.search.tooltip": "Suchen", - "gui.createrailwaysnavigator.navigator.location.tooltip": "Nächsgelegene Station von aktueller Position", + "gui.createrailwaysnavigator.navigator.location.tooltip": "Nächstgelegene Station von aktueller Position", "gui.createrailwaysnavigator.navigator.refresh.tooltip": "Aktualisieren", "gui.createrailwaysnavigator.navigator.switch.tooltip": "Eingaben tauschen", "gui.createrailwaysnavigator.route_details.title": "Streckendetails", "gui.createrailwaysnavigator.route_details.departure": "Abfahrt in", + "gui.createrailwaysnavigator.route_details.arrival": "Ankunft in", "gui.createrailwaysnavigator.route_details.next_transfer_time": "Umstieg in", "gui.createrailwaysnavigator.route_details.transfer": "Umstieg", @@ -150,7 +156,7 @@ "gui.createrailwaysnavigator.global_settings.option_alias.title": "Bahnhof Tags", "gui.createrailwaysnavigator.global_settings.option_alias.description": "Fasse einzelne Bahnhöfe zu einem einzigen Bahnhof mit mehreren Bahnsteigen und eigenem Namen zusammen, damit der Navigator Umsteigemöglichkeiten etc. vorschlagen kann.", "gui.createrailwaysnavigator.global_settings.option_blacklist.title": "Bahnhof Blacklist", - "gui.createrailwaysnavigator.global_settings.option_blacklist.description": "Schließe Stationen aus, die nicht in den Navigtionsergebnissen erscheinen sollen. Diese Stationen werden bei der Suche ignoriert.", + "gui.createrailwaysnavigator.global_settings.option_blacklist.description": "Schließe Stationen aus, die nicht in den Navigationsergebnissen erscheinen sollen. Diese Stationen werden bei der Suche ignoriert.", "gui.createrailwaysnavigator.global_settings.train_group.title": "Zugkategorien", "gui.createrailwaysnavigator.global_settings.train_group.description": "Zugkategorien dienen der Organisation von Zügen (z.B. Regionalverkehr, Fernverkehr, ...). Nutzer können nach diesen Kategorien filtern.", "gui.createrailwaysnavigator.global_settings.train_blacklist.title": "Zug Blacklist", @@ -206,6 +212,7 @@ "gui.createrailwaysnavigator.line": "Linie", "gui.createrailwaysnavigator.following_trains": "Folgezüge:", "gui.createrailwaysnavigator.via": "über", + "gui.createrailwaysnavigator.too_small": "Zu klein!", "gui.createrailwaysnavigator.advanced_display_settings.title": "Verbesserte Anzeige Einstellungen", "gui.createrailwaysnavigator.advanced_display_settings.display_type": "Anzeigetyp", @@ -213,7 +220,28 @@ "gui.createrailwaysnavigator.advanced_display_settings.info_type": "Informationsart", "gui.createrailwaysnavigator.advanced_display_settings.info_type.description": "Gibt an, wie detailliert die Informationen sind.", "gui.createrailwaysnavigator.advanced_display_settings.double_sided": "Beidseitig", + "gui.createrailwaysnavigator.advanced_display_settings.advanced_settings": "Erweiterte Einstellungen", + "gui.createrailwaysnavigator.advanced_display_settings.font_color": "Zeichenfarbe", + "gui.createrailwaysnavigator.advanced_display_settings.back_color": "Hintergrundfarbe", + "gui.createrailwaysnavigator.advanced_display_settings.show_arrival": "Zeige Ankunft der Züge", + "gui.createrailwaysnavigator.advanced_display_settings.show_arrival.description": "Wenn aktiviert oder der Zug anschließend in einen ausgeblendeten Abschnitt fährt (unabhängig von dieser Einstellung), wird die Ankunft des Zuges angezeigt.", + "gui.createrailwaysnavigator.advanced_display_settings.carriage_index": "Wagennummernversatz", + "gui.createrailwaysnavigator.advanced_display_settings.carriage_index.description": "Die Zahl, die zur aktuellen Wagennummer hinzuaddiert wird. (z.B. Wagennummer = 3, Versatz = 5, Ergebnis = 08)", + "gui.createrailwaysnavigator.advanced_display_settings.overwrite_carriage_index": "Überschreiben", + "gui.createrailwaysnavigator.advanced_display_settings.overwrite_carriage_index.description": "Wenn aktiviert, wird der Wert nicht zur aktuellen Wagennummer hinzuaddiert, sondern durch den eingegebenen Wert ersetzt. (z.B. Wagennummer = 3, Versatz = 5, Ergebnis = 05)", + "gui.createrailwaysnavigator.advanced_display_settings.show_stats": "Zeige Zugstatistik", + "gui.createrailwaysnavigator.advanced_display_settings.show_exit": "Zeige Ausstiegsseite", + "gui.createrailwaysnavigator.advanced_display_settings.show_time_and_date": "Zeige Datum und Uhrzeit", + "gui.createrailwaysnavigator.advanced_display_settings.show_connections": "Zeige Anschlüsse", + "gui.createrailwaysnavigator.advanced_display_settings.show_line_color": "Zeige Linienfarbe", + "gui.createrailwaysnavigator.advanced_display_settings.show_line_color.description": "Hebt den Zugname mit der Farbe der aktuellen Linie hervor.", + "enum.createrailwaysnavigator.train_text_components": "Zugbezeichnung", + "enum.createrailwaysnavigator.train_text_components.description": "Text, der auf den Bahnsteiganzeigen verwendet werden sollen.", + "enum.createrailwaysnavigator.train_text_components.all": "Alle", + "enum.createrailwaysnavigator.train_text_components.train_name": "Nur Zugname", + "enum.createrailwaysnavigator.train_text_components.destination": "Nur Ziel", + "enum.createrailwaysnavigator.display_info_type": "Informationsart", "enum.createrailwaysnavigator.display_info_type.description": "Gibt an, wie viele Informationen dargestellt werden sollen.", "enum.createrailwaysnavigator.display_info_type.simple": "Einfach", @@ -231,7 +259,9 @@ "enum.createrailwaysnavigator.display_type.info.passenger_information": "Repräsentieren die Anzeigen, die in Zügen vorkommen. Dargestellt werden der nächste Halt, die Ausstiegsseite und (je nach Einstellung) noch weitere Informationen.", "enum.createrailwaysnavigator.display_type.platform": "Bahnsteiganzeige", "enum.createrailwaysnavigator.display_type.info.platform": "Diese Anzeigen werden an Bahnsteigen verwendet und zeigen die nächsten abfahrenden Züge mit zusätzlichen Informationen an. Funktioniert nicht auf Zügen!", - + "enum.createrailwaysnavigator.display_type.departure_board": "Abfahrtstafel", + "enum.createrailwaysnavigator.display_type.info.departure_board": "Eine Zusammenfassung aller Züge, die an einem Bahnhof abfahren.", + "enum.createrailwaysnavigator.side": "Seite", "enum.createrailwaysnavigator.side.description": "Die Seite des Blocks, auf dem die Informationen angezeigt werden sollen.", "enum.createrailwaysnavigator.side.front": "Vorderseite", @@ -246,11 +276,28 @@ "enum.createrailwaysnavigator.time_display.eta": "ETA", "enum.createrailwaysnavigator.time_display.info.eta": "ETA (Geschätzte Ankunftszeit)", + "enum.createrailwaysnavigator.train_filter": "Zugfilter", + "enum.createrailwaysnavigator.train_filter.description": "Vergleicht Züge basierend auf das ausgewählte Kriterium, um zu entscheiden, welche Züge berücksichtigt werden sollen.", + "enum.createrailwaysnavigator.train_filter.any": "Beliebiger Zug", + "enum.createrailwaysnavigator.train_filter.info.any": "Jeder Zug wird hier berücksichtigt.", + "enum.createrailwaysnavigator.train_filter.same_line": "Gleiche Linie", + "enum.createrailwaysnavigator.train_filter.info.same_line": "Nut Züge mit der gleichen Zuglinie werden berücksichtigt.", + "enum.createrailwaysnavigator.train_filter.same_group": "Gleiche Kategorie", + "enum.createrailwaysnavigator.train_filter.info.same_group": "Nur Züge mit der gleichen Zugkategorie werden berücksichtigt.", + "create.display_source.advanced_display": "Verbesserte Anzeige", "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width": "Zugname Spaltenbreite", - "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description": "Die Breite der Spalte für den Zugname in Pixel. (Standard: 16)", + "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width_next": "Zugname Breite (Nächste Abfahrt)", + "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width_table": "Zugname Breite (Folgezüge)", + "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description": "in Blockpixel", "gui.createrailwaysnavigator.display_source.advanced_display.platform_width": "Gleis Spaltenbreite", - "gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description": "Die Breite der Spalte für das Gleis in Pixel. (-1 = Autom., Standard: -1)", + "gui.createrailwaysnavigator.display_source.advanced_display.platform_width_next": "Gleis Breite (Nächste Abfahrt)", + "gui.createrailwaysnavigator.display_source.advanced_display.platform_width_table": "Gleis Breite (Folgezüge)", + "gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description": "in Blockpixel", + "gui.createrailwaysnavigator.display_source.advanced_display.info_width": "Infobereich Breite", + "gui.createrailwaysnavigator.display_source.advanced_display.info_width.description": "in Prozent des verbleibenden Platzes", + "gui.createrailwaysnavigator.display_source.advanced_display.stopovers_width": "Zwischenhalte Breite", + "gui.createrailwaysnavigator.display_source.advanced_display.stopovers_width.description": "in Prozent des verbleibenden Platzes", "gui.createrailwaysnavigator.section_settings.title": "Abschnittseinstellungen", "gui.createrailwaysnavigator.section_settings.train_groups": "Zugkategorie zuweisen", @@ -264,15 +311,27 @@ "createrailwaysnavigator.schedule.condition.dynamic_delay.title": "Warte: %s..%s", "createrailwaysnavigator.schedule.condition.dynamic_delay.at_least": "oder mindestens %s", + "createrailwaysnavigator.schedule.condition.train_separation.settings": "Zugverteilung Einstellungen", + "createrailwaysnavigator.schedule.condition.train_separation": "Zugverteilung", + "createrailwaysnavigator.schedule.condition.train_separation.title": "Trennung: %s", + "createrailwaysnavigator.schedule.condition.train_separation.description": "Abfahrt %s nach:", + + "createrailwaysnavigator.schedule.instruction.configure": "Konfigurieren...", "createrailwaysnavigator.schedule.instruction.travel_section": "Neuer Fahrplanabschnitt", "createrailwaysnavigator.schedule.instruction.travel_section.description": "Anfang eines neuen Fahrplanabschnitts.", - "createrailwaysnavigator.schedule.instruction.travel_section.configure": "Konfigurieren...", "createrailwaysnavigator.schedule.instruction.travel_section.train_group": " - Setze Zugkategorie: ", "createrailwaysnavigator.schedule.instruction.travel_section.train_line": " - Setze Zuglinie: ", "createrailwaysnavigator.schedule.instruction.travel_section.include_previous_station": " - Start des nächsten Bereichs einbinden: ", "createrailwaysnavigator.schedule.instruction.travel_section.usable": " - Navigierbar: ", - "createrailwaysnavigator.schedule.instruction.reset_timings": "Zeiten zurücksetzen", + "createrailwaysnavigator.schedule.instruction.reset_timings": "Zeiten zurücksetzen", + + "goggles.createrailwaysnavigator.train_listener.departures.title": "Abfahrtverlauf", + "goggles.createrailwaysnavigator.train_listener.departures.any": "Letzte Abfahrt:", + "goggles.createrailwaysnavigator.train_listener.departures.line": "Abfahrt Zuglinie:", + "goggles.createrailwaysnavigator.train_listener.departures.group": "Abfahrt Zugkategorie:", + "goggles.createrailwaysnavigator.train_listener.departures.nothing": "(Kürzlich keine Abfahrten)", + "goggles.createrailwaysnavigator.train_listener.departures.has_more": "+ %s weitere...", "display.createrailwaysnavigator.train_destination.simple": "Kompakt", "display.createrailwaysnavigator.train_destination.extended": "Erweitert", @@ -282,9 +341,10 @@ "display.createrailwaysnavigator.platform.running_text": "Lauftext", "display.createrailwaysnavigator.platform.table": "Tabelle", "display.createrailwaysnavigator.platform.focus": "Fokussiert", + "display.createrailwaysnavigator.departure_board.table": "Tabelle", "gui.createrailwaysnavigator.saved_routes.title": "Gespeicherte Reisen", - "gui.createrailwaysnavigator.schedule_board.title": "Abfahrtenliste", + "gui.createrailwaysnavigator.schedule_board.title": "Abfahrtsliste", "gui.createrailwaysnavigator.station_tags.title": "Bahnhof-Tags", "gui.createrailwaysnavigator.journey_info.title": "Reiseinformation", "gui.createrailwaysnavigator.journey_info.date": "Tag %s", @@ -312,11 +372,12 @@ "gui.createrailwaysnavigator.saved_routes.saved_route": "Gespeicherte Reise", "block.createrailwaysnavigator.advanced_display.ber.arrival": "Ankunft", "block.createrailwaysnavigator.advanced_display.ber.cancelled": "Fällt heute aus!", - "block.createrailwaysnavigator.advanced_display.ber.delayed": "Verspätung ca. %s Minuten", + "block.createrailwaysnavigator.advanced_display.ber.delay_abs_suffix": "Minuten", + "block.createrailwaysnavigator.advanced_display.ber.delayed": "Verspätung ca. %s", "block.createrailwaysnavigator.advanced_display.ber.information_about_cancelled": "Information zu %s: Fällt heute aus!", - "block.createrailwaysnavigator.advanced_display.ber.information_about_delayed": "Information zu %s: Verspätung ca. %s Minuten", - "block.createrailwaysnavigator.advanced_display.ber.cancelled2": ", fällt heute aus. Wir bitten um Entschuldigung.", - "block.createrailwaysnavigator.advanced_display.ber.delayed2": ", heute circa %s Minuten später.", + "block.createrailwaysnavigator.advanced_display.ber.information_about_delayed": "Information zu %s: Verspätung ca. %s", + "block.createrailwaysnavigator.advanced_display.ber.cancelled2": "fällt heute aus. Wir bitten um Entschuldigung.", + "block.createrailwaysnavigator.advanced_display.ber.delayed2": "heute circa %s später.", "block.createrailwaysnavigator.advanced_display.ber.reason": "Grund dafür ist eine ", "gui.createrailwaysnavigator.route_widget.show_details": "Details ansehen", "gui.createrailwaysnavigator.route_widget.save": "Speichern", @@ -328,7 +389,7 @@ "gui.createrailwaysnavigator.saved_routes.in_days": "In %s Tagen", "gui.createrailwaysnavigator.saved_route_widget.show_details": "Details ansehen", "gui.createrailwaysnavigator.saved_route_widget.share": "Teilen...", - "gui.createrailwaysnavigator.saved_route_widget.notifications": "Benachrichtigunen aktivieren", + "gui.createrailwaysnavigator.saved_route_widget.notifications": "Benachrichtigungen aktivieren", "gui.createrailwaysnavigator.train_status.unknown_delay": "Verzögerungen im Betriebsablauf", "gui.createrailwaysnavigator.train_status.delay_previous_journey": "Verspätung aus vorheriger Fahrt", "gui.createrailwaysnavigator.train_status.red_signal": "Haltzeigendes Signal", @@ -342,7 +403,7 @@ "gui.createrailwaysnavigator.route_details.remove_route.tooltip": "Route nicht mehr speichern", "gui.createrailwaysnavigator.route_details.show_popup.tooltip": "Popup-Fenster anzeigen", "gui.createrailwaysnavigator.navigator.my_profile": "Mein Profil", - "gui.createrailwaysnavigator.navigator.train_initialization_warning": "Manche Routen können unvollständig sein oder überhaupt nicht vorgeschalgen werden, da Create Railways Navigator noch nicht alle Züge initialisiert hat.", + "gui.createrailwaysnavigator.navigator.train_initialization_warning": "Manche Routen können unvollständig sein oder überhaupt nicht vorgeschlagen werden, da Create Railways Navigator noch nicht alle Züge initialisiert hat.", "gui.createrailwaysnavigator.global_settings.train_line.title": "Zuglinien", "gui.createrailwaysnavigator.global_settings.train_line.color": "Farbe auswählen", "gui.createrailwaysnavigator.global_settings.train_line.description": "Erstelle Linien, um mehrere Züge zu Linienzügen zusammenzufassen, deren Anzeigename zu überschreiben oder um weitere Einstellungen anzupassen. (Kann nur im Fahrplan zugewiesen werden)", diff --git a/common/src/main/resources/assets/createrailwaysnavigator/lang/en_us.json b/common/src/main/resources/assets/createrailwaysnavigator/lang/en_us.json index c12e9f8c..f51299f8 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/lang/en_us.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/lang/en_us.json @@ -75,10 +75,15 @@ "gui.createrailwaysnavigator.common.false": "No", "gui.createrailwaysnavigator.common.search": "Search", "gui.createrailwaysnavigator.common.auto": "Auto", + "gui.createrailwaysnavigator.common.max": "Max", "gui.createrailwaysnavigator.common.server_error": "Server error while executing task. Look console for details.", "gui.createrailwaysnavigator.common.delete": "Delete", "gui.createrailwaysnavigator.common.add": "Add", "gui.createrailwaysnavigator.common.help": "Get Help", + "gui.createrailwaysnavigator.common.copy": "Copy", + "gui.createrailwaysnavigator.common.paste": "Paste", + "gui.createrailwaysnavigator.common.click_to_search": "Click to search", + "gui.createrailwaysnavigator.common.click_to_edit": "Click to edit", "gui.createrailwaysnavigator.navigator.title": "Create Railways Navigator", "gui.createrailwaysnavigator.navigator.no_connections": "No connections found.", @@ -99,6 +104,7 @@ "gui.createrailwaysnavigator.route_details.title": "Route Details", "gui.createrailwaysnavigator.route_details.departure": "Departure in", + "gui.createrailwaysnavigator.route_details.arrival": "Arrival in", "gui.createrailwaysnavigator.route_details.next_transfer_time": "Transfer in", "gui.createrailwaysnavigator.route_details.transfer": "Transfer", @@ -206,6 +212,7 @@ "gui.createrailwaysnavigator.line": "Line", "gui.createrailwaysnavigator.following_trains": "Following trains:", "gui.createrailwaysnavigator.via": "via", + "gui.createrailwaysnavigator.too_small": "Too small!", "gui.createrailwaysnavigator.advanced_display_settings.title": "Advanced Display Settings", "gui.createrailwaysnavigator.advanced_display_settings.display_type": "Display Type", @@ -213,7 +220,28 @@ "gui.createrailwaysnavigator.advanced_display_settings.info_type": "Information Type", "gui.createrailwaysnavigator.advanced_display_settings.info_type.description": "Determines how detailed the information is.", "gui.createrailwaysnavigator.advanced_display_settings.double_sided": "Double-sided", + "gui.createrailwaysnavigator.advanced_display_settings.advanced_settings": "Advanced Settings", + "gui.createrailwaysnavigator.advanced_display_settings.font_color": "Font color", + "gui.createrailwaysnavigator.advanced_display_settings.back_color": "Background color", + "gui.createrailwaysnavigator.advanced_display_settings.show_arrival": "Show arrival of trains", + "gui.createrailwaysnavigator.advanced_display_settings.show_arrival.description": "If activated or the train will go in an excluded section (regardless of this setting), the arrival of the train will be displayed.", + "gui.createrailwaysnavigator.advanced_display_settings.carriage_index": "Carriage Index Offset", + "gui.createrailwaysnavigator.advanced_display_settings.carriage_index.description": "The number that is added to the current carriage index. (e.g. Index = 3, Offset = 5, Result = 08)", + "gui.createrailwaysnavigator.advanced_display_settings.overwrite_carriage_index": "Overwrite index", + "gui.createrailwaysnavigator.advanced_display_settings.overwrite_carriage_index.description": "If checked, the value will not be added to the carriage index, but replaced by the entered value. (e.g. Index = 3, Offset = 5, Result = 05)", + "gui.createrailwaysnavigator.advanced_display_settings.show_stats": "Show train stats", + "gui.createrailwaysnavigator.advanced_display_settings.show_exit": "Show exit direction", + "gui.createrailwaysnavigator.advanced_display_settings.show_time_and_date": "Show time and date", + "gui.createrailwaysnavigator.advanced_display_settings.show_connections": "Show next connections", + "gui.createrailwaysnavigator.advanced_display_settings.show_line_color": "Show train line color", + "gui.createrailwaysnavigator.advanced_display_settings.show_line_color.description": "Highlights the train name text with the color of the current train line.", + "enum.createrailwaysnavigator.train_text_components": "Train Text Components", + "enum.createrailwaysnavigator.train_text_components.description": "Text components which should be displayed on the passenger displays.", + "enum.createrailwaysnavigator.train_text_components.all": "All", + "enum.createrailwaysnavigator.train_text_components.train_name": "Train Name only", + "enum.createrailwaysnavigator.train_text_components.destination": "Destination only", + "enum.createrailwaysnavigator.display_info_type": "Display Info Type", "enum.createrailwaysnavigator.display_info_type.description": "Determines how much information should be displayed on your display board.", "enum.createrailwaysnavigator.display_info_type.simple": "Simple", @@ -226,11 +254,13 @@ "enum.createrailwaysnavigator.display_type": "Display Type", "enum.createrailwaysnavigator.display_type.description": "The type of your display which depends on their purpose.", "enum.createrailwaysnavigator.display_type.train_destination": "Train Destination", - "enum.createrailwaysnavigator.display_type.info.train_destination": "Inteded to be used outside of trains as it shows information about the train itself such as the name, destination and (if selected) stopovers and other information.", + "enum.createrailwaysnavigator.display_type.info.train_destination": "Intended to be used outside of trains as it shows information about the train itself such as the name, destination and (if selected) stopovers and other information.", "enum.createrailwaysnavigator.display_type.passenger_information": "Passenger Information", "enum.createrailwaysnavigator.display_type.info.passenger_information": "Represents the displays found inside of trains. These displays will show the next stop, the exit direction and (if selected) train speed and a route overview.", "enum.createrailwaysnavigator.display_type.platform": "Platform Display", - "enum.createrailwaysnavigator.display_type.info.platform": "These displays should be used on train station platforms and shows the next ariving trains with additional details if selected. Cannot be used in trains!", + "enum.createrailwaysnavigator.display_type.info.platform": "These displays should be used on train station platforms and shows the next arriving trains with additional details if selected. Cannot be used in trains!", + "enum.createrailwaysnavigator.display_type.departure_board": "Departure Board", + "enum.createrailwaysnavigator.display_type.info.departure_board": "A summary of all trains departing from a station.", "enum.createrailwaysnavigator.side": "Side", "enum.createrailwaysnavigator.side.description": "The side of the block where the information should be rendered on.", @@ -246,11 +276,28 @@ "enum.createrailwaysnavigator.time_display.eta": "ETA", "enum.createrailwaysnavigator.time_display.info.eta": "ETA (estimated time of arrival)", + "enum.createrailwaysnavigator.train_filter": "Train Filter", + "enum.createrailwaysnavigator.train_filter.description": "Compares trains based on the selected criterion to decide which trains should be taken into account.", + "enum.createrailwaysnavigator.train_filter.any": "Any train", + "enum.createrailwaysnavigator.train_filter.info.any": "Every train is taken into account here.", + "enum.createrailwaysnavigator.train_filter.same_line": "Same Line", + "enum.createrailwaysnavigator.train_filter.info.same_line": "Only trains with the same train line are taken into account.", + "enum.createrailwaysnavigator.train_filter.same_group": "Same Group", + "enum.createrailwaysnavigator.train_filter.info.same_group": "Only trains with the same train group are taken into account.", + "create.display_source.advanced_display": "Advanced Displays", - "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width": "Train Name Column Width", - "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description": "in block pixels. (Default: 16)", - "gui.createrailwaysnavigator.display_source.advanced_display.platform_width": "Platform Column Width", - "gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description": "in block pixels. (Default: Auto)", + "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width": "Train Name Width", + "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width_next": "Train Name Width (Next departure)", + "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width_table": "Train Name Width (Following trains)", + "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description": "in block pixels", + "gui.createrailwaysnavigator.display_source.advanced_display.platform_width": "Platform Width", + "gui.createrailwaysnavigator.display_source.advanced_display.platform_width_next": "Platform Width (Next departure)", + "gui.createrailwaysnavigator.display_source.advanced_display.platform_width_table": "Platform Width (Following trains)", + "gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description": "in block pixels", + "gui.createrailwaysnavigator.display_source.advanced_display.info_width": "Info Section Width", + "gui.createrailwaysnavigator.display_source.advanced_display.info_width.description": "in percent of the remaining screen width", + "gui.createrailwaysnavigator.display_source.advanced_display.stopovers_width": "Stopovers Section Width", + "gui.createrailwaysnavigator.display_source.advanced_display.stopovers_width.description": "in percent of the remaining screen width", "gui.createrailwaysnavigator.section_settings.title": "Section Settings", "gui.createrailwaysnavigator.section_settings.train_groups": "Assign Train Group", @@ -263,10 +310,15 @@ "createrailwaysnavigator.schedule.condition.dynamic_delay.min_duration": "Minimum Duration", "createrailwaysnavigator.schedule.condition.dynamic_delay.title": "Wait: %s..%s", "createrailwaysnavigator.schedule.condition.dynamic_delay.at_least": "or at least %s", + + "createrailwaysnavigator.schedule.condition.train_separation.settings": "Train Separation Settings", + "createrailwaysnavigator.schedule.condition.train_separation": "Train Separation", + "createrailwaysnavigator.schedule.condition.train_separation.title": "Separation: %s", + "createrailwaysnavigator.schedule.condition.train_separation.description": "Departure %s after:", + "createrailwaysnavigator.schedule.instruction.configure": "Configure...", "createrailwaysnavigator.schedule.instruction.travel_section": "New Schedule Section", "createrailwaysnavigator.schedule.instruction.travel_section.description": "Beginning of a new schedule section.", - "createrailwaysnavigator.schedule.instruction.travel_section.configure": "Configure...", "createrailwaysnavigator.schedule.instruction.travel_section.train_group": " - Set Train Group: ", "createrailwaysnavigator.schedule.instruction.travel_section.train_line": " - Set Train Line: ", "createrailwaysnavigator.schedule.instruction.travel_section.include_previous_station": " - Include start of next section: ", @@ -274,6 +326,13 @@ "createrailwaysnavigator.schedule.instruction.reset_timings": "Reset Timings", + "goggles.createrailwaysnavigator.train_listener.departures.title": "Departure History", + "goggles.createrailwaysnavigator.train_listener.departures.any": "Last departure:", + "goggles.createrailwaysnavigator.train_listener.departures.line": "Departures by Train Line:", + "goggles.createrailwaysnavigator.train_listener.departures.group": "Departures by Train Group:", + "goggles.createrailwaysnavigator.train_listener.departures.nothing": "(No recent departures)", + "goggles.createrailwaysnavigator.train_listener.departures.has_more": "+ %s more...", + "display.createrailwaysnavigator.train_destination.simple": "Compact", "display.createrailwaysnavigator.train_destination.extended": "Extended", "display.createrailwaysnavigator.train_destination.detailed": "Detailed", @@ -282,6 +341,7 @@ "display.createrailwaysnavigator.platform.running_text": "Scrolling Text", "display.createrailwaysnavigator.platform.table": "Table", "display.createrailwaysnavigator.platform.focus": "Focus", + "display.createrailwaysnavigator.departure_board.table": "Table", "gui.createrailwaysnavigator.saved_routes.title": "Saved Routes", "gui.createrailwaysnavigator.schedule_board.title": "Schedule Board", @@ -312,11 +372,13 @@ "gui.createrailwaysnavigator.saved_routes.saved_route": "Saved Route", "block.createrailwaysnavigator.advanced_display.ber.arrival": "Arrival", "block.createrailwaysnavigator.advanced_display.ber.cancelled": "Cancelled", - "block.createrailwaysnavigator.advanced_display.ber.delayed": "Delay approx. %s minutes", + "block.createrailwaysnavigator.advanced_display.ber.delay_abs_suffix": "minutes", + "block.createrailwaysnavigator.advanced_display.ber.delayed": "Delay approx. %s", "block.createrailwaysnavigator.advanced_display.ber.information_about_cancelled": "Information about %s: This train got cancelled", - "block.createrailwaysnavigator.advanced_display.ber.information_about_delayed": "Information about %s: Delay approx. %s minutes", - "block.createrailwaysnavigator.advanced_display.ber.cancelled2": ", is cancelled today. We apologize for the inconvenience.", - "block.createrailwaysnavigator.advanced_display.ber.delayed2": ", today approx. %s minutes delayed.", + "block.createrailwaysnavigator.advanced_display.ber.information_about_delayed": "Information about %s: Delay approx. %s", + "block.createrailwaysnavigator.advanced_display.ber.information_about_delayed_with_unit": "Information about %s: Delay approx. %s", + "block.createrailwaysnavigator.advanced_display.ber.cancelled2": "is cancelled today. We apologize for the inconvenience.", + "block.createrailwaysnavigator.advanced_display.ber.delayed2": "today approx. %s delayed.", "block.createrailwaysnavigator.advanced_display.ber.reason": "Reason: ", "gui.createrailwaysnavigator.route_widget.show_details": "Show details", "gui.createrailwaysnavigator.route_widget.save": "Save", diff --git a/common/src/main/resources/assets/createrailwaysnavigator/lang/es_es.json b/common/src/main/resources/assets/createrailwaysnavigator/lang/es_es.json index be3d0836..c37b9dc5 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/lang/es_es.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/lang/es_es.json @@ -3,12 +3,8 @@ "advancement.createrailwaysnavigator.navigator.description": "Crea un navegador para buscar conexiones de tren de una estación de tren a otra.", "advancement.createrailwaysnavigator.advanced_display": "No del todo 4k", "advancement.createrailwaysnavigator.advanced_display.description": "Actualiza tus paneles de visualización para mostrar más información e incluso colócalos en tus trenes.", - - "itemGroup.createrailwaysnavigator.tab": "Create Railways Navigator", - "item.createrailwaysnavigator.navigator": "Navegador de ferrocarriles", "item.createrailwaysnavigator.navigator.tooltip.summary": "El _navegador_ muestra posibles _conexiones de trenes_ con información adicional como _escalas_, _datos en tiempo real_ y más.", - "block.createrailwaysnavigator.train_station_clock": "Reloj de estación de tren", "block.createrailwaysnavigator.advanced_display_block": "Bloque de pantalla avanzada", "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "Úsalo en _trenes_, como _pantalla de destino del tren_ o _pantalla de información para pasajeros_, o en _estaciones de tren_ como pantallas de _plataforma mejoradas_ que también muestran más información que los tableros de pantalla regulares.", @@ -34,20 +30,18 @@ "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "Úsalo en _trenes_, como _pantalla de destino del tren_ o _pantalla de información para pasajeros_, o en _estaciones de tren_ como pantallas de _plataforma mejoradas_ que también muestran más información que los tableros de pantalla regulares.", "block.createrailwaysnavigator.advanced_display_sloped.tooltip.condition1": "Al hacer clic derecho con una llave inglesa", "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "Abre un menú para _configurar_ la _pantalla_.", - + "block.createrailwaysnavigator.advanced_display_slab": "Losa de pantalla avanzada", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.summary": "Úsalo en los _trenes_, como un _pantalla de destino del tren_ o _pantalla de información de pasejeros_ o en los _estaciones del tren_ como ...", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.behaviour1": "Abrir un menú para _configurar_ la _pantalla_.", "block.createrailwaysnavigator.advanced_display.ber.not_in_service": "¡Fuera de servicio!", - "category.createrailwaysnavigator.crn": "Navegador de ferrocarriles", "key.createrailwaysnavigator.route_overlay_options": "Mostrar opciones de superposición de ruta", - "enum.createrailwaysnavigator.overlay_position": "Posición de la pantalla", "enum.createrailwaysnavigator.overlay_position.info.top_left": "Esquina superior izquierda", "enum.createrailwaysnavigator.overlay_position.info.top_right": "Esquina superior derecha", "enum.createrailwaysnavigator.overlay_position.info.bottom_left": "Esquina inferior izquierda", "enum.createrailwaysnavigator.overlay_position.info.bottom_right": "Esquina inferior derecha", - "gui.createrailwaysnavigator.loading.title": "Descargando datos del servidor...", - "gui.createrailwaysnavigator.overlay_settings.title": "Configuración de superposición de ruta", "gui.createrailwaysnavigator.route_overlay_settings.show_details": "Mostrar detalles", "gui.createrailwaysnavigator.route_overlay_settings.unpin": "Eliminar superposición de ruta", @@ -60,7 +54,6 @@ "gui.createrailwaysnavigator.route_overlay_settings.narrator.description": "El narrador anuncia eventos importantes en tu viaje, por ejemplo, la próxima parada, cambios, etc.", "gui.createrailwaysnavigator.route_overlay_settings.notifications": "Notificaciones", "gui.createrailwaysnavigator.route_overlay_settings.notifications.description": "Recibe notificaciones emergentes sobre eventos importantes en tu viaje, por ejemplo, la próxima parada, cambios, etc.", - "gui.createrailwaysnavigator.common.expand": "Mostrar detalles", "gui.createrailwaysnavigator.common.collapse": "Ocultar detalles", "gui.createrailwaysnavigator.common.go_back": "Volver", @@ -72,7 +65,6 @@ "gui.createrailwaysnavigator.common.search": "Buscar", "gui.createrailwaysnavigator.common.auto": "Automático", "gui.createrailwaysnavigator.common.server_error": "Error del servidor al ejecutar la tarea. Mira la consola para más detalles.", - "gui.createrailwaysnavigator.navigator.title": "Navegador de ferrocarriles", "gui.createrailwaysnavigator.navigator.no_connections": "No se encontraron conexiones.", "gui.createrailwaysnavigator.navigator.not_searched": "Aún no se ha buscado nada.", @@ -88,13 +80,10 @@ "gui.createrailwaysnavigator.navigator.search.tooltip": "Buscar", "gui.createrailwaysnavigator.navigator.location.tooltip": "Estación más cercana desde la posición actual", "gui.createrailwaysnavigator.navigator.switch.tooltip": "Cambiar campos", - "gui.createrailwaysnavigator.route_details.title": "Detalles de la ruta", "gui.createrailwaysnavigator.route_details.departure": "Salida en", "gui.createrailwaysnavigator.route_details.next_transfer_time": "Transbordo en", "gui.createrailwaysnavigator.route_details.transfer": "Transbordo", - "gui.createrailwaysnavigator.route_details.save_route": "Guardar conexión", - "gui.createrailwaysnavigator.route_overview.title": "Detalles de la ruta", "gui.createrailwaysnavigator.route_overview.journey_begins": "¡Tu viaje comienza! %s a %s, salida %s", "gui.createrailwaysnavigator.route_overview.journey_begins_with_platform": "¡Tu viaje comienza! %s a %s, salida %s en el andén %s", @@ -124,7 +113,7 @@ "gui.createrailwaysnavigator.route_overview.notification.platform_changed.title": "¡Tu andén ha cambiado!", "gui.createrailwaysnavigator.route_overview.notification.platform_changed": "Tu tren en %s sale hoy desde el andén %s.", "gui.createrailwaysnavigator.route_overview.notification.train_delayed.title": "%s: Llegada %s retrasada.", - "gui.createrailwaysnavigator.route_overview.notification.train_delayed": "%s en lugar de %s en %s", + "gui.createrailwaysnavigator.route_overview.notification.train_delayed": "%s en lugar de %s en %s", "gui.createrailwaysnavigator.route_overview.notification.train_cancelled.title": "%s: Tren cancelado", "gui.createrailwaysnavigator.route_overview.notification.train_cancelled": "%s a %s está cancelado hoy.", "gui.createrailwaysnavigator.route_overview.notification.transfer.title": "Transbordo próximo", @@ -137,7 +126,6 @@ "gui.createrailwaysnavigator.route_overview.notification.journey_completed.title": "¡Has llegado a tu destino!", "gui.createrailwaysnavigator.route_overview.notification.journey_completed": "Gracias por viajar y que tengas un buen día", "gui.createrailwaysnavigator.route_overview.date": "Día %s, %s", - "gui.createrailwaysnavigator.global_settings.title": "Configuración global", "gui.createrailwaysnavigator.global_settings.option.tooltip": "Haz clic para editar", "gui.createrailwaysnavigator.global_settings.option_alias.title": "Etiquetas de estaciones de tren", @@ -148,33 +136,28 @@ "gui.createrailwaysnavigator.global_settings.train_group.description": "Crear grupos de trenes para organizar todos los trenes (por ejemplo, servicios regionales, servicios de larga distancia, ...). Los usuarios pueden decidir qué grupos quieren usar.", "gui.createrailwaysnavigator.global_settings.train_blacklist.title": "Lista negra de trenes", "gui.createrailwaysnavigator.global_settings.train_blacklist.description": "Excluir trenes, por ejemplo, trenes de carga, trenes especiales, etc., para que no se utilicen en las sugerencias de rutas.", - - "gui.createrailwaysnavigator.station_tags.title": "Configuración de etiquetas de estaciones de tren", "gui.createrailwaysnavigator.station_tags.summary": "Contiene %s estaciones de tren", "gui.createrailwaysnavigator.station_tags.editor": "Última edición por %s el %s", "gui.createrailwaysnavigator.station_tags.add.tooltip": "Crear nueva entrada", "gui.createrailwaysnavigator.station_tags.delete_alias.tooltip": "Eliminar etiqueta", "gui.createrailwaysnavigator.station_tags.delete_station.tooltip": "Eliminar estación", + "gui.createrailwaysnavigator.station_tags.modify_platform.tooltip": "Haga clic para cambiar", "gui.createrailwaysnavigator.station_tags.add_station.tooltip": "Agregar estación", "gui.createrailwaysnavigator.station_tags.hint.station_name": "Nombre de la estación de tren", "gui.createrailwaysnavigator.station_tags.hint.platform": "Andén", "gui.createrailwaysnavigator.station_tags.enter_name": "Introduce el nombre aquí", - "gui.createrailwaysnavigator.train_group_settings.title": "Configuración de grupos de trenes", "gui.createrailwaysnavigator.train_group_settings.summary": "Contiene %s trenes", "gui.createrailwaysnavigator.train_group_settings.editor": "Última edición por %s el %s", "gui.createrailwaysnavigator.train_group_settings.delete_alias.tooltip": "Eliminar grupo", "gui.createrailwaysnavigator.train_group_settings.delete_station.tooltip": "Eliminar tren", "gui.createrailwaysnavigator.train_group_settings.add_station.tooltip": "Agregar tren", - "gui.createrailwaysnavigator.blacklist.title": "Lista negra de estaciones de tren", "gui.createrailwaysnavigator.blacklist.add.tooltip": "Agregar a la lista negra", "gui.createrailwaysnavigator.blacklist.delete.tooltip": "Eliminar de la lista negra", - "gui.createrailwaysnavigator.train_blacklist.title": "Lista negra de trenes", "gui.createrailwaysnavigator.train_blacklist.add.tooltip": "Agregar a la lista negra", "gui.createrailwaysnavigator.train_blacklist.delete.tooltip": "Eliminar de la lista negra", - "gui.createrailwaysnavigator.search_settings.title": "Configuración de búsqueda", "gui.createrailwaysnavigator.search_settings.transfer_time": "Tiempo mínimo de transbordo", "gui.createrailwaysnavigator.search_settings.transfer_time.description": "El tiempo mínimo que debería estar disponible para cambiar de tren. (1h ~ 50 segundos en tiempo real)", @@ -184,38 +167,32 @@ "gui.createrailwaysnavigator.search_settings.train_groups.overview.all": "Todos", "gui.createrailwaysnavigator.search_settings.train_groups.overview.none": "Ninguno", "gui.createrailwaysnavigator.search_settings.train_groups.tooltip.reset": "Restablecer filtro", - "gui.createrailwaysnavigator.new_text_entry.add.tooltip": "Agregar", - "gui.createrailwaysnavigator.time": "Hora: %s", "gui.createrailwaysnavigator.time.now": "ahora", "gui.createrailwaysnavigator.time_format.dhm": "%s días %s h. %s min.", "gui.createrailwaysnavigator.time_format.hm": "%s h. %s min.", - "gui.createrailwaysnavigator.time_format.m": "%s min.", - + "gui.createrailwaysnavigator.time_format.m": "%s minutos.", "gui.createrailwaysnavigator.platform": "Andén", "gui.createrailwaysnavigator.departure": "Salida", "gui.createrailwaysnavigator.destination": "Destino", "gui.createrailwaysnavigator.line": "Línea", "gui.createrailwaysnavigator.following_trains": "Trenes siguientes:", "gui.createrailwaysnavigator.via": "a través de", - "gui.createrailwaysnavigator.advanced_display_settings.title": "Configuración avanzada de la pantalla", "gui.createrailwaysnavigator.advanced_display_settings.display_type": "Tipo de pantalla", "gui.createrailwaysnavigator.advanced_display_settings.display_type.description": "Determina la información mostrada.", "gui.createrailwaysnavigator.advanced_display_settings.info_type": "Tipo de información", "gui.createrailwaysnavigator.advanced_display_settings.info_type.description": "Determina el detalle de la información.", "gui.createrailwaysnavigator.advanced_display_settings.double_sided": "Doble cara", - "enum.createrailwaysnavigator.display_info_type": "Tipo de información de la pantalla", "enum.createrailwaysnavigator.display_info_type.description": "Determina cuánta información se debe mostrar en tu pantalla de visualización.", - "enum.createrailwaysnavigator.display_info_type.simple": "Simple", + "enum.createrailwaysnavigator.display_info_type.simple": "Sencillo", "enum.createrailwaysnavigator.display_info_type.info.simple": "La pantalla solo mostrará la información más importante sin detalles adicionales.", "enum.createrailwaysnavigator.display_info_type.detailed": "Detallado", "enum.createrailwaysnavigator.display_info_type.info.detailed": "Se mostrará la información más importante con algunos detalles, como la velocidad del tren, las paradas intermedias, etc.", "enum.createrailwaysnavigator.display_info_type.informative": "Informativo", "enum.createrailwaysnavigator.display_info_type.info.informative": "Muestra toda la información que podría ser interesante y la presenta en un diseño elegante. No se recomienda para pantallas pequeñas, ya que el texto podría ser muy pequeño.", - "enum.createrailwaysnavigator.display_type": "Tipo de pantalla", "enum.createrailwaysnavigator.display_type.description": "El tipo de pantalla depende de su propósito.", "enum.createrailwaysnavigator.display_type.train_destination": "Destino del tren", @@ -224,26 +201,44 @@ "enum.createrailwaysnavigator.display_type.info.passenger_information": "Representa las pantallas que se encuentran dentro de los trenes. Estas pantallas mostrarán la próxima parada, la dirección de salida y (si se selecciona) la velocidad del tren y una vista general de la ruta.", "enum.createrailwaysnavigator.display_type.platform": "Pantalla de plataforma", "enum.createrailwaysnavigator.display_type.info.platform": "Estas pantallas deben usarse en las plataformas de las estaciones de tren y muestran los próximos trenes que llegan con detalles adicionales si se seleccionan. ¡No se pueden usar en los trenes!", - "enum.createrailwaysnavigator.side": "Lado", "enum.createrailwaysnavigator.side.description": "El lado del bloque donde se debe renderizar la información.", "enum.createrailwaysnavigator.side.front": "Lado frontal", "enum.createrailwaysnavigator.side.info.front": "La información solo se renderizará en el lado frontal. Este es el comportamiento predeterminado.", "enum.createrailwaysnavigator.side.both": "Ambos lados", "enum.createrailwaysnavigator.side.info.both": "La información se renderizará en ambos lados.", - "enum.createrailwaysnavigator.time_display": "Visualización del tiempo", "enum.createrailwaysnavigator.time_display.description": "Determina cómo se debe mostrar el tiempo.", - "enum.createrailwaysnavigator.time_display.abs": "ABS", + "enum.createrailwaysnavigator.time_display.abs": "Absoluto", "enum.createrailwaysnavigator.time_display.info.abs": "ABS (absoluto)", - "enum.createrailwaysnavigator.time_display.eta": "ETA", + "enum.createrailwaysnavigator.time_display.eta": "Hora estimada de llegada", "enum.createrailwaysnavigator.time_display.info.eta": "ETA (tiempo estimado de llegada)", - "create.display_source.advanced_display": "Pantallas avanzadas", "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width": "Ancho de columna del nombre del tren", "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description": "en píxeles de bloque. (Por defecto: 16)", "gui.createrailwaysnavigator.display_source.advanced_display.platform_width": "Ancho de columna de plataforma", "gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description": "en píxeles de bloque. (Por defecto: Automático)", - - "createrailwaysnavigator.moin": "moin" + "gui.createrailwaysnavigator.section_settings.title": "Configuración de las secciones", + "gui.createrailwaysnavigator.section_settings.train_groups": "Asignar el grupo del tren", + "gui.createrailwaysnavigator.section_settings.train_lines": "Asignar la línea del tren", + "gui.createrailwaysnavigator.section_settings.include_previous_station": "Incluye inicio de la próxima sección", + "gui.createrailwaysnavigator.section_settings.usable": "Navegable", + "gui.createrailwaysnavigator.section_settings.none": "(Ninguna Opción)", + "createrailwaysnavigator.schedule.condition.dynamic_delay": "Retraso dinámico", + "createrailwaysnavigator.schedule.condition.dynamic_delay.min_duration": "Duración mínima", + "createrailwaysnavigator.schedule.condition.dynamic_delay.title": "Espero: %s..%s", + "createrailwaysnavigator.schedule.condition.dynamic_delay.at_least": "o al menos %s", + "createrailwaysnavigator.schedule.instruction.travel_section": "Nueva Sección de Horario", + "createrailwaysnavigator.schedule.instruction.travel_section.description": "Inicio de la nueva sección de horario.", + "createrailwaysnavigator.schedule.instruction.travel_section.configure": "Configuraciones...", + "createrailwaysnavigator.schedule.instruction.travel_section.usable": " -Navegable: ", + "gui.createrailwaysnavigator.station_tags.title": "Configuración de etiquetas de estaciones de tren", + "gui.createrailwaysnavigator.journey_info.title": "Información del viaje", + "gui.createrailwaysnavigator.journey_info.date": "Día %s", + "gui.createrailwaysnavigator.journey_info.train": "%s (%s) a %s", + "gui.createrailwaysnavigator.color_picker.custom": "Personalizada...", + "gui.createrailwaysnavigator.color_picker.no_color": "Sin color", + "gui.createrailwaysnavigator.search_options.train_groups.all": "Todos", + "gui.createrailwaysnavigator.search_options.saved_routes.all": "Todos", + "gui.createrailwaysnavigator.saved_routes.today": "Hoy" } diff --git a/common/src/main/resources/assets/createrailwaysnavigator/lang/eu_es.json b/common/src/main/resources/assets/createrailwaysnavigator/lang/eu_es.json new file mode 100644 index 00000000..67896baf --- /dev/null +++ b/common/src/main/resources/assets/createrailwaysnavigator/lang/eu_es.json @@ -0,0 +1,315 @@ +{ + "advancement.createrailwaysnavigator.navigator": "Eskerrik asko bidaiatzeagatik", + "advancement.createrailwaysnavigator.navigator.description": "Nabigatzaile bat sortu tren geltoki batetik beste batera ibilbide bat bilatzeko.", + "advancement.createrailwaysnavigator.advanced_display": "4k nahiko ez", + "advancement.createrailwaysnavigator.advanced_display.description": "Zeure pantaila-taulak hobetu informazio gehiago erakusteko, edota zeure trenetan kokatzeko.", + "item.createrailwaysnavigator.navigator": "Trenbide Nabigatzailea", + "item.createrailwaysnavigator.navigator.tooltip.summary": "_Nabigatzaileak_ erabilgarri diren _tren loturak_ erakusten ditu baita gainerazko informazioa ere, hala nola: _tren aldaketak_, _denbora errealeko datuak_, _munduko ordua_, etab.", + "block.createrailwaysnavigator.train_station_clock": "Geltokiko Erlojua", + "block.createrailwaysnavigator.advanced_display_block": "Geltokiko Erlojua", + "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "_Trenetan_ erabili _Helmuga-pantaila_ edo _bidaiarientzako informazio pantaila_ gisa, edo _Tren Geltokietan_ ere, _Nasako pantaila aurreratu_ gisa, ohiko pantaila-taulak baino xehetasun gehiago ere erakusten dituena.", + "block.createrailwaysnavigator.advanced_display_block.tooltip.condition1": "Giltza zabalgarri batez eskuineko klika eginez", + "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "_Pantaila konfiguratzeko_ menua ireki.", + "block.createrailwaysnavigator.advanced_display": "Pantaila-Taula Aurreratua", + "block.createrailwaysnavigator.advanced_display.tooltip.summary": "_Trenetan_ erabili _Helmuga-pantaila_ edo _bidaiarientzako informazio pantaila_ gisa, edo _Tren Geltokietan_ ere, _Nasako pantaila aurreratu_ gisa, ohiko pantaila-taulak baino xehetasun gehiago ere erakusten dituena.", + "block.createrailwaysnavigator.advanced_display.tooltip.condition1": "Giltza zabalgarri batez eskuineko klika eginez", + "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "_Pantaila konfiguratzeko_ menua ireki.", + "block.createrailwaysnavigator.advanced_display_small": "Pantaila Aurreratu Txikia", + "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "_Trenetan_ erabili _Helmuga-pantaila_ edo _bidaiarientzako informazio pantaila_ gisa, edo _Tren Geltokietan_ ere, _Nasako pantaila aurreratu_ gisa, ohiko pantaila-taulak baino xehetasun gehiago ere erakusten dituena.", + "block.createrailwaysnavigator.advanced_display_small.tooltip.condition1": "Giltza zabalgarri batez eskuineko klika eginez", + "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "_Pantaila konfiguratzeko_ menua ireki.", + "block.createrailwaysnavigator.advanced_display_panel": "Pantaila Aurreratu - Panela", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "_Trenetan_ erabili _Helmuga-pantaila_ edo _bidaiarientzako informazio pantaila_ gisa, edo _Tren Geltokietan_ ere, _Nasako pantaila aurreratu_ gisa, ohiko pantaila-taulak baino xehetasun gehiago ere erakusten dituena.", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.condition1": "Giltza zabalgarri batez eskuineko klika eginez", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "_Pantaila konfiguratzeko_ menua ireki.", + "block.createrailwaysnavigator.advanced_display_half_panel": "Pantaila Aurreratu - Panel-erdia", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "_Trenetan_ erabili _Helmuga-pantaila_ edo _bidaiarientzako informazio pantaila_ gisa, edo _Tren Geltokietan_ ere, _Nasako pantaila aurreratu_ gisa, ohiko pantaila-taulak baino xehetasun gehiago ere erakusten dituena.", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.condition1": "Giltza zabalgarri batez eskuineko klika eginez", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "_Pantaila konfiguratzeko_ menua ireki.", + "block.createrailwaysnavigator.advanced_display_sloped": "Pantaila Aurreratu Makurtua", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "_Trenetan_ erabili _Helmuga-pantaila_ edo _bidaiarientzako informazio pantaila_ gisa, edo _Tren Geltokietan_ ere, _Nasako pantaila aurreratu_ gisa, ohiko pantaila-taulak baino xehetasun gehiago ere erakusten dituena.", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.condition1": "Giltza zabalgarri batez eskuineko klika eginez", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "_Pantaila konfiguratzeko_ menua ireki.", + "block.createrailwaysnavigator.advanced_display_slab": "Pantaila Aurreratu - Lauza", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.summary": "_Trenetan_ erabili _Helmuga-pantaila_ edo _bidaiarientzako informazio pantaila_ gisa, edo _Tren Geltokietan_ ere, _Nasako pantaila aurreratu_ gisa, ohiko pantaila-taulak baino xehetasun gehiago ere erakusten dituena.", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.condition1": "Giltza zabalgarri batez eskuineko klika eginez", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.behaviour1": "_Pantaila konfiguratzeko_ menua ireki.", + "block.createrailwaysnavigator.advanced_display.ber.not_in_service": "Zerbitzuz kanpo!", + "category.createrailwaysnavigator.crn": "Create Railways Navigator", + "key.createrailwaysnavigator.route_overlay_options": "Erakutsi ibilbide gainjarriaren aukeraj", + "enum.createrailwaysnavigator.overlay_position": "Erakutsi Kokapena", + "enum.createrailwaysnavigator.overlay_position.info.top_left": "Goi-ezkerreko Izkina", + "enum.createrailwaysnavigator.overlay_position.info.top_right": "Goi-eskuineko Izkina", + "enum.createrailwaysnavigator.overlay_position.info.bottom_left": "Behe-ezkerreko Izkina", + "enum.createrailwaysnavigator.overlay_position.info.bottom_right": "Behe-eskuineko Izkina", + "gui.createrailwaysnavigator.loading.title": "Serbitzariarengandik datuak eskuratzen...", + "gui.createrailwaysnavigator.overlay_settings.title": "Ibilbide Jaingarriaren Ezarpenak", + "gui.createrailwaysnavigator.route_overlay_settings.show_details": "Erakutsi Xehetasunak", + "gui.createrailwaysnavigator.route_overlay_settings.unpin": "Ibilbide Jaingarria Kendu", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.on": "Narratzailearen iragarkiak gaituak.", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.off": "Narratzailearen iragarkiak ezgaituak.", + "gui.createrailwaysnavigator.route_overlay_settings.notifications.on": "Jakinarazpenak gaituak", + "gui.createrailwaysnavigator.route_overlay_settings.notifications.off": "Jakinarazpenak ezgaituak", + "gui.createrailwaysnavigator.route_overlay_settings.scale": "Interfazearen Eskala", + "gui.createrailwaysnavigator.route_overlay_settings.narrator": "Narratzailearen iragarkiak", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.description": "Narratzaileak ibilbidean zeharreko gertakizunak iragartzen ditu, hala-nola: hurrengo geralekua, lotuneak, etab.", + "gui.createrailwaysnavigator.route_overlay_settings.notifications": "Jakinarazpenak", + "gui.createrailwaysnavigator.route_overlay_settings.notifications.description": "Ibilbideari buruzko jakinarazpen gainerakorrak jaso, hala-nola: hurrengo geralekua, lotuneak, etab.", + "gui.createrailwaysnavigator.common.expand": "Erakutsi Xehetasunak", + "gui.createrailwaysnavigator.common.collapse": "Ezkutatu Xehetasunak", + "gui.createrailwaysnavigator.common.go_back": "Atzera bota", + "gui.createrailwaysnavigator.common.go_to_top": "Goikoenera Joan", + "gui.createrailwaysnavigator.common.reset_defaults": "Lehentesietara berrezarri", + "gui.createrailwaysnavigator.common.count": "Kopurua", + "gui.createrailwaysnavigator.common.true": "Bai", + "gui.createrailwaysnavigator.common.false": "Ez", + "gui.createrailwaysnavigator.common.search": "Bilatu", + "gui.createrailwaysnavigator.common.auto": "Auto", + "gui.createrailwaysnavigator.common.server_error": "Serbitzariaren errorea ekintza eragiterakoan. Behatu detaileak kontsolan.", + "gui.createrailwaysnavigator.common.delete": "Ezabatu", + "gui.createrailwaysnavigator.common.add": "Gehitu", + "gui.createrailwaysnavigator.common.help": "Laguntza Eskuratu", + "gui.createrailwaysnavigator.navigator.title": "Create Railways Navigator", + "gui.createrailwaysnavigator.navigator.no_connections": "Ez da Ibilbide egokirik aurkitu.", + "gui.createrailwaysnavigator.navigator.not_searched": "Ez da ezer bilatu oraingoz.", + "gui.createrailwaysnavigator.navigator.searching": "Bilatu Ibilbideak", + "gui.createrailwaysnavigator.navigator.error_title": "Ezin izan da ibilbiderik egin.", + "gui.createrailwaysnavigator.navigator.start_end_null": "Jatorria edo helmuga ez da zehaztu.", + "gui.createrailwaysnavigator.navigator.start_end_equal": "Jatorria eta helmuga berdinak dira.", + "gui.createrailwaysnavigator.navigator.route_entry.connection_in_past": "❌ Trena jadanik abiatu da", + "gui.createrailwaysnavigator.navigator.route_entry.transfer": "Lotunea", + "gui.createrailwaysnavigator.navigator.route_entry.station_start": "%s-(e)tik", + "gui.createrailwaysnavigator.navigator.global_settings.tooltip": "Ezarpen Globalak", + "gui.createrailwaysnavigator.navigator.search_settings.tooltip": "Ezarpenak Bilatu", + "gui.createrailwaysnavigator.navigator.search.tooltip": "Bilatu", + "gui.createrailwaysnavigator.navigator.location.tooltip": "Zugandik hurbilen dagoen geltokia", + "gui.createrailwaysnavigator.navigator.refresh.tooltip": "Errefreskatu", + "gui.createrailwaysnavigator.navigator.switch.tooltip": "Zelaia aldatu", + "gui.createrailwaysnavigator.route_details.title": "Ibilbidearen Xehetasunak", + "gui.createrailwaysnavigator.route_details.departure": "Irteera:", + "gui.createrailwaysnavigator.route_details.next_transfer_time": "Hurrengo trena irteteko: ", + "gui.createrailwaysnavigator.route_details.transfer": "Lotunea", + "gui.createrailwaysnavigator.route_overview.title": "Bidai Laguna", + "gui.createrailwaysnavigator.route_overview.journey_begins": "Zure bidaia hastear dago! %s-(e)tik %s-(e)ra, irteera %s-(e)tan", + "gui.createrailwaysnavigator.route_overview.journey_begins_with_platform": "Zure bidaia hastear dago! %s-(e)tik %s-(e)ra, irteera %s-(e)tan %s nasatik", + "gui.createrailwaysnavigator.route_overview.train_details": "%s-(e)tik %s-(e)ra", + "gui.createrailwaysnavigator.route_overview.next_stop": "Hurrengo Geralekua: %s", + "gui.createrailwaysnavigator.route_overview.transfer": "Aldaketa: %s → %s", + "gui.createrailwaysnavigator.route_overview.transfer_with_platform": "Aldaketa: %s → %s, %s nasan", + "gui.createrailwaysnavigator.route_overview.journey_completed": "Bidaia amaitu da", + "gui.createrailwaysnavigator.route_overview.after_journey": "%s-(e)ra heldu zara. Eskerrik asko bidaiatzeagatik eta egun on bat izan.", + "gui.createrailwaysnavigator.route_overview.next_connections": "Hurrengo Loturak", + "gui.createrailwaysnavigator.route_overview.schedule_transfer": "Lotunea", + "gui.createrailwaysnavigator.route_overview.train_cancelled": "Trena ezeztatua", + "gui.createrailwaysnavigator.route_overview.train_cancellation_info": "%s-ri buruzko informazioa", + "gui.createrailwaysnavigator.route_overview.stop_cancelled": "❌ Ezeztatua", + "gui.createrailwaysnavigator.route_overview.connection_endangered": "Lotura arriskutsua", + "gui.createrailwaysnavigator.route_overview.connection_missed": "Lotura galdua", + "gui.createrailwaysnavigator.route_overview.connection_cancelled": "Trena ezeztatua", + "gui.createrailwaysnavigator.route_overview.journey_interrupted": "%s-(e)rantzeko bidaia ezin da jarraitu.", + "gui.createrailwaysnavigator.route_overview.connection_missed_info": "Zure trenaren atzerapena dela eta, lotura galdu duzu. Nabigatzailean bidaia alternatibo bat bila dezakezu. Eragozpenengatik barkamena eskatzen dizugu.", + "gui.createrailwaysnavigator.route_overview.train_cancelled_info": "%s -ri buruzko informazioa: Tren hau ezeztatua izan da! Eragozpenengatik barkamena eskatzen dizugu. Nabigatzailean bidaia alternatibo bat bila dezakezu.", + "gui.createrailwaysnavigator.route_overview.train_cancelled_title": "Trena ezeztatua izan da", + "gui.createrailwaysnavigator.route_overview.journey_interrupted_info": "%s -(e)rantzeko bidaia ezin da jarraitu. Nabigatzailean bidaia alternatibo bat bila dezakezu.", + "gui.createrailwaysnavigator.route_overview.options": "%s sakatu aukerak ikusteko", + "gui.createrailwaysnavigator.route_overview.notification.journey_begins.title": "Zure %s-(e)rantzeko bidaia hasi da!", + "gui.createrailwaysnavigator.route_overview.notification.journey_begins": "%s-(e)tik %s-(e)ra, irteera %s-(e)tan", + "gui.createrailwaysnavigator.route_overview.notification.journey_begins_with_platform": "%s-(e)tik %s-(e)ra, irteera %s-(e)tan %s nasatik", + "gui.createrailwaysnavigator.route_overview.notification.platform_changed.title": "Zure trenaren nasa aldatu da!", + "gui.createrailwaysnavigator.route_overview.notification.platform_changed": "Zure trena %s-(e)n %s nasatk abiatuko da.", + "gui.createrailwaysnavigator.route_overview.notification.train_delayed.title": "%s: etorrera %sz atzeratu da", + "gui.createrailwaysnavigator.route_overview.notification.train_delayed": "%s %s-(r)en ordez %s-(e)n", + "gui.createrailwaysnavigator.route_overview.notification.train_cancelled.title": "%s: Trena ezeztatua", + "gui.createrailwaysnavigator.route_overview.notification.train_cancelled": "%s %s-(e)rantz ezeztatua izan da gaur.", + "gui.createrailwaysnavigator.route_overview.notification.transfer.title": "%s: etorrera %s-z atzeratu da.", + "gui.createrailwaysnavigator.route_overview.notification.transfer": "Aldaketa: %s → %s", + "gui.createrailwaysnavigator.route_overview.notification.transfer_with_platform": "Aldaketa: %s → %s, %s nasan", + "gui.createrailwaysnavigator.route_overview.notification.connection_endangered.title": "Lotura arriskutsua!", + "gui.createrailwaysnavigator.route_overview.notification.connection_endangered": "Ziurrenik ezin izango duzu %s %s-(e)ra garaiz hartu.", + "gui.createrailwaysnavigator.route_overview.notification.connection_missed.title": "Trena galdua", + "gui.createrailwaysnavigator.route_overview.notification.connection_missed": " %s trena %s-ra galdu duzu.", + "gui.createrailwaysnavigator.route_overview.notification.journey_completed.title": "Helmugara iritsi zara!", + "gui.createrailwaysnavigator.route_overview.notification.journey_completed": "Eskerrik asko bidaiatzeagatik eta egun on bat izan.", + "gui.createrailwaysnavigator.route_overview.date": "%s eguna, %s-(e)tan", + "gui.createrailwaysnavigator.global_settings.title": "Ezarpen Globalak", + "gui.createrailwaysnavigator.global_settings.option.tooltip": "Egin klik aldatzeko", + "gui.createrailwaysnavigator.global_settings.option_alias.title": "Geltokien Etiketak", + "gui.createrailwaysnavigator.global_settings.option_alias.description": "Geltoki Etiketak definitu nasa ugariko geltokiak (adb. MyStation 1, MyStation 2, ...) geltoki bakartzat hartzeko (adb. MyStation) hautaturiko izenarekin, nabigatzaileak, besteak beste, loturak gomendatu ditzan.", + "gui.createrailwaysnavigator.global_settings.option_blacklist.title": "Geltokien Zerrenda Beltza", + "gui.createrailwaysnavigator.global_settings.option_blacklist.description": "Nabigatzailean agertu beharko ez liratekeen geltokiak baztertu. Geltoki hauek ez dira kontuan hartuko ibilbideak sortzerakoan.", + "gui.createrailwaysnavigator.global_settings.train_group.title": "Tren Taldeak", + "gui.createrailwaysnavigator.global_settings.train_group.description": "Trenak antolatzeko taldeak sortu (adb. eskualdeko serbitzuak, distantzia-handiko serbitzuak, etab.).", + "gui.createrailwaysnavigator.global_settings.train_blacklist.title": "Trenen Zerrenda Beltza", + "gui.createrailwaysnavigator.global_settings.train_blacklist.description": "Trenak beztartu, hala nola, kargo trenak, tren bereziak, etab., ibilbide proposamenetan ez agertzearren.", + "gui.createrailwaysnavigator.station_tags.summary": "%s geltoki dauzka", + "gui.createrailwaysnavigator.station_tags.editor": "%s-k aldatudu azkenengoz %s-an", + "gui.createrailwaysnavigator.station_tags.add.tooltip": "Sarrera berri bat sortu", + "gui.createrailwaysnavigator.station_tags.delete_alias.tooltip": "Ezabatu Etiketa", + "gui.createrailwaysnavigator.station_tags.delete_station.tooltip": "Ezabatu Geltokia", + "gui.createrailwaysnavigator.station_tags.modify_platform.tooltip": "Klikatu aldatzeko", + "gui.createrailwaysnavigator.station_tags.add_station.tooltip": "Geltokia gehitu", + "gui.createrailwaysnavigator.station_tags.hint.station_name": "Geltokiaren izena", + "gui.createrailwaysnavigator.station_tags.hint.platform": "Nasaren Izena", + "gui.createrailwaysnavigator.station_tags.enter_name": "Izena idatzi", + "gui.createrailwaysnavigator.train_group_settings.title": "Tren Taldeen Ezarpenak", + "gui.createrailwaysnavigator.train_group_settings.summary": "%s tren dauzka", + "gui.createrailwaysnavigator.train_group_settings.editor": "%s-k aldatudu azkenengoz %s-an", + "gui.createrailwaysnavigator.train_group_settings.delete_alias.tooltip": "Taldea Ezabatu", + "gui.createrailwaysnavigator.train_group_settings.delete_station.tooltip": "Trena Ezabatu", + "gui.createrailwaysnavigator.train_group_settings.add_station.tooltip": "Trena Gehitu", + "gui.createrailwaysnavigator.blacklist.title": "Geltokien Zerrenda Beltza", + "gui.createrailwaysnavigator.blacklist.add.tooltip": "Gehitu zerrenda beltzera", + "gui.createrailwaysnavigator.blacklist.delete.tooltip": "Zerrenda beltzetik kendu", + "gui.createrailwaysnavigator.train_blacklist.title": "Trenen Zerrenda Beltza", + "gui.createrailwaysnavigator.train_blacklist.add.tooltip": "Zerrenda beltzera gehitu", + "gui.createrailwaysnavigator.train_blacklist.delete.tooltip": "Zerrenda beltzetik kendu", + "gui.createrailwaysnavigator.search_settings.title": "Ezarpenak Bilatu", + "gui.createrailwaysnavigator.search_settings.transfer_time": "Gutxienezko tren-aldaketa denbora tartea", + "gui.createrailwaysnavigator.search_settings.transfer_time.description": "Gutxienezko denbora trenez aldatzeko. (Munduko 1h = Bizitza errealeko 50 segundu)", + "gui.createrailwaysnavigator.search_settings.train_groups": "Tren Kategoria Filtroa", + "gui.createrailwaysnavigator.search_settings.train_groups.description": "Erabaki zein kategoriatatik zer tren erabili nahi duzun.", + "gui.createrailwaysnavigator.search_settings.train_groups.overview": "Aukeratutako kategoriak: %s", + "gui.createrailwaysnavigator.search_settings.train_groups.overview.all": "Denak", + "gui.createrailwaysnavigator.search_settings.train_groups.overview.none": "Bat ere ez", + "gui.createrailwaysnavigator.search_settings.train_groups.tooltip.reset": "Filtroa berrezarri", + "gui.createrailwaysnavigator.new_text_entry.add.tooltip": "Gehitu", + "gui.createrailwaysnavigator.time": "Ordua: %s", + "gui.createrailwaysnavigator.time.now": "orain", + "gui.createrailwaysnavigator.time_format.dhm": "%s egun %s ordu %s min.", + "gui.createrailwaysnavigator.time_format.hm": "%s ordu %s min.", + "gui.createrailwaysnavigator.time_format.m": "%s minutu", + "gui.createrailwaysnavigator.platform": "Nasa", + "gui.createrailwaysnavigator.departure": "Abiapuntua", + "gui.createrailwaysnavigator.destination": "Helmuga", + "gui.createrailwaysnavigator.line": "Linea", + "gui.createrailwaysnavigator.following_trains": "Hurrengo trenak:", + "gui.createrailwaysnavigator.via": "via", + "gui.createrailwaysnavigator.advanced_display_settings.title": "Pantaila Aurreratuen Ezarpenak", + "gui.createrailwaysnavigator.advanced_display_settings.display_type": "Pantaila Mota", + "gui.createrailwaysnavigator.advanced_display_settings.display_type.description": "Bistaratzen den informazioa ezartzen du.", + "gui.createrailwaysnavigator.advanced_display_settings.info_type": "Informazio Mota", + "gui.createrailwaysnavigator.advanced_display_settings.info_type.description": "Informazioaren xehetasuna ezartzen du.", + "gui.createrailwaysnavigator.advanced_display_settings.double_sided": "Aldebikoa", + "enum.createrailwaysnavigator.display_info_type": "Informazio Mota Bistaratu", + "enum.createrailwaysnavigator.display_info_type.description": "Pantaila-tauletan bistaratzen den informazio kopurua ezartzen du.", + "enum.createrailwaysnavigator.display_info_type.simple": "Bakuna", + "enum.createrailwaysnavigator.display_info_type.info.simple": "Pantailan inforaziorik garrantzitsuena baino ez da bistaratuko.", + "enum.createrailwaysnavigator.display_info_type.detailed": "Xehetsua", + "enum.createrailwaysnavigator.display_info_type.info.detailed": "Informazio garrantzitsu ugari bistaratzen dira, hala-nola: abiadura, geralekuak, etab.", + "enum.createrailwaysnavigator.display_info_type.informative": "Informatiboa", + "enum.createrailwaysnavigator.display_info_type.info.informative": "Interesgarria den edozein informazio bistaratzen da diseinu ikusgarri batez. Ez da gomendagarria pantaila txikientzako, textua irakurtezina bilaka daitekelako.", + "enum.createrailwaysnavigator.display_type": "Pantaila Mota", + "enum.createrailwaysnavigator.display_type.description": "Pantailaren erabileraren araberako mota.", + "enum.createrailwaysnavigator.display_type.train_destination": "Helburua", + "enum.createrailwaysnavigator.display_type.info.train_destination": "Trenen kanpokaldean erabiltzeko egokia da, izena, helmuga edota (aukeratzen bada) geltokiak, besteak beste, bezalako trenari buruzko informazioa, besteen artean, bistaratzen baita.", + "enum.createrailwaysnavigator.display_type.passenger_information": "Bidaiarientzako Informazioa", + "enum.createrailwaysnavigator.display_type.info.passenger_information": "Trenaren barrukaldean erabiltzeko egokia da. Pantaila hauetan, hurrengo geralekua, irteera aldea eta (aukeratzen bada), abiadura eta ibilbidearen eskema bistaratuko da.", + "enum.createrailwaysnavigator.display_type.platform": "Nasako Pantaila", + "enum.createrailwaysnavigator.display_type.info.platform": "Pantaila hauek tren-geltokietan erabiltzeko egokiak dira. Helduko diren trenak eta, aukeratzen bada, haiei buruzko xehetasun gehigarriak bistaratzen dira. Ezin dira trenetan erabili.", + "enum.createrailwaysnavigator.side": "Aldea", + "enum.createrailwaysnavigator.side.description": "Blokearen zer aldetan informazioa bistaratuko den aukeratu.", + "enum.createrailwaysnavigator.side.front": "Aurrekaldea", + "enum.createrailwaysnavigator.side.info.front": "Informazioa aurrekaldean baino ez da bistaratuko. (Lehentesia)", + "enum.createrailwaysnavigator.side.both": "Alde biak", + "enum.createrailwaysnavigator.side.info.both": "Informazioa alde bietan bistaratuko da.", + "enum.createrailwaysnavigator.time_display": "Denbora Bistaratzea", + "enum.createrailwaysnavigator.time_display.description": "Denbora nola bistaratzen den ezarri.", + "enum.createrailwaysnavigator.time_display.abs": "ABS", + "enum.createrailwaysnavigator.time_display.info.abs": "ABS (absolutua)", + "enum.createrailwaysnavigator.time_display.eta": "HDE", + "enum.createrailwaysnavigator.time_display.info.eta": "HDE (Heldura Denboa Estimatua)", + "create.display_source.advanced_display": "Pantaila Aurreratua", + "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width": "Tren Izena zutabearen zabalera", + "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description": "bloke pixeletan. (Lehentesia: 16)", + "gui.createrailwaysnavigator.display_source.advanced_display.platform_width": "Nasa zutabearen zabalera", + "gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description": "bloke pixeletan. (Lehentesia: Auto)", + "gui.createrailwaysnavigator.section_settings.title": "Atal Ezarpenak", + "gui.createrailwaysnavigator.section_settings.train_groups": "Tren Taldea Ezarri", + "gui.createrailwaysnavigator.section_settings.train_lines": "Tren Linea Ezarri", + "gui.createrailwaysnavigator.section_settings.include_previous_station": "Hurrengo atalaren hasiera barne", + "gui.createrailwaysnavigator.section_settings.usable": "Irisgarria", + "gui.createrailwaysnavigator.section_settings.none": "(Bat ere ez)", + "createrailwaysnavigator.schedule.condition.dynamic_delay": "Atzerapen Dinamikoa", + "createrailwaysnavigator.schedule.condition.dynamic_delay.min_duration": "Gutxienezko Iraupena", + "createrailwaysnavigator.schedule.condition.dynamic_delay.title": "Itxaron: %s.. %s", + "createrailwaysnavigator.schedule.condition.dynamic_delay.at_least": "edo gutxienez %s", + "createrailwaysnavigator.schedule.instruction.travel_section": "Ordutegi Atal Berria", + "createrailwaysnavigator.schedule.instruction.travel_section.description": "Ordutegi atal berri baten hasiera.", + "createrailwaysnavigator.schedule.instruction.travel_section.configure": "Konfiguratu...", + "createrailwaysnavigator.schedule.instruction.travel_section.train_group": "- Tren Taldea Ezarri:", + "createrailwaysnavigator.schedule.instruction.travel_section.train_line": " - Tren Linea Ezarri: ", + "createrailwaysnavigator.schedule.instruction.travel_section.include_previous_station": " - Hurrengo atalaren hasiera barnean sartu: ", + "createrailwaysnavigator.schedule.instruction.travel_section.usable": " - Irisgarri: ", + "createrailwaysnavigator.schedule.instruction.reset_timings": "Denbora berrezarri", + "display.createrailwaysnavigator.train_destination.simple": "Txikitu", + "display.createrailwaysnavigator.train_destination.extended": "Luzatua", + "display.createrailwaysnavigator.train_destination.detailed": "Xehetsua", + "display.createrailwaysnavigator.passenger_information.running_text": "Testu Mugikorra", + "display.createrailwaysnavigator.passenger_information.detailed_with_schedule": "Ordutegiarekin Xehetsua", + "display.createrailwaysnavigator.platform.running_text": "Testu Mugikorra", + "display.createrailwaysnavigator.platform.table": "Taula", + "display.createrailwaysnavigator.platform.focus": "Fokua", + "gui.createrailwaysnavigator.saved_routes.title": "Nire ibilbideak", + "gui.createrailwaysnavigator.schedule_board.title": "Ordutegia", + "gui.createrailwaysnavigator.station_tags.title": "Geltoki Etiketak", + "gui.createrailwaysnavigator.journey_info.title": "Ibilbideari buruzko informazioak", + "gui.createrailwaysnavigator.journey_info.date": "s%. egunean", + "gui.createrailwaysnavigator.journey_info.train": "%s (%s) %s-(e)rantz", + "gui.createrailwaysnavigator.color_picker.custom": "Pertsonalizatua...", + "gui.createrailwaysnavigator.color_picker.no_color": "Kolorerik ez", + "gui.createrailwaysnavigator.schedule_board.view_details": "Ikusi Xehetasunak", + "gui.createrailwaysnavigator.schedule_board.train_from": "%s-(e)tik", + "gui.createrailwaysnavigator.search_options.departure_in": "Irteera:", + "gui.createrailwaysnavigator.search_options.train_groups": "Tren Taldeak", + "gui.createrailwaysnavigator.search_options.transfer_time": "Aldatzeko Denbora Tartea", + "gui.createrailwaysnavigator.search_options.advanced_options": "Aukera Aurreratuak", + "gui.createrailwaysnavigator.search_options.train_groups.all": "Denak", + "gui.createrailwaysnavigator.search_options.train_groups.excluded": "%s gabe", + "gui.createrailwaysnavigator.search_options.saved_routes.all": "Denak", + "gui.createrailwaysnavigator.search_options.saved_routes.excluded": "%s gabe", + "gui.createrailwaysnavigator.empty_list": "Zerrenda hutsik dago", + "gui.createrailwaysnavigator.new_entry.add": "Gehitu sarrera berria", + "gui.createrailwaysnavigator.new_entry.new": "Berria:", + "gui.createrailwaysnavigator.saved_routes.saved": "%s gorde da", + "gui.createrailwaysnavigator.route_overview.notification.schedule_changed.title": "Ordutegia aldatu da!", + "gui.createrailwaysnavigator.route_overview.notification.schedule_changed": "Gorderik zenuen ibilbide baten ordutegia aldatu egin da! Mesedez, aldaketak nabigatzailean behatu.", + "gui.createrailwaysnavigator.route_overview.transfers": "%s Aldaketa", + "gui.createrailwaysnavigator.route_overview.cancelled": "Ezeztatua", + "gui.createrailwaysnavigator.saved_routes.saved_route": "Gordetako Ibilbidea", + "block.createrailwaysnavigator.advanced_display.ber.arrival": "Helduera", + "block.createrailwaysnavigator.advanced_display.ber.cancelled": "Ezeztatua", + "block.createrailwaysnavigator.advanced_display.ber.delayed": "%s minutuz atzeratua gutxi-gora-behera", + "block.createrailwaysnavigator.advanced_display.ber.information_about_cancelled": "%s-(e)ri buruzko informazioa: Trena ezeztatua", + "block.createrailwaysnavigator.advanced_display.ber.information_about_delayed": "%s-(e)ri buruzko informazioa: %s minutuz atzeratua gutxi-gora-behera", + "block.createrailwaysnavigator.advanced_display.ber.cancelled2": ", atzeratu da gaur. Barkatu eragozpenak.", + "block.createrailwaysnavigator.advanced_display.ber.delayed2": ", gaur %s minutuz atzeratuta dago gutxi-gora-behera.", + "block.createrailwaysnavigator.advanced_display.ber.reason": "Zergatia: ", + "gui.createrailwaysnavigator.route_widget.show_details": "Erakutsi Xehetasunak", + "gui.createrailwaysnavigator.route_widget.save": "Gorde", + "gui.createrailwaysnavigator.route_widget.remove": "Kendu", + "gui.createrailwaysnavigator.route_widget.share": "Partekatu...", + "gui.createrailwaysnavigator.saved_routes.in_the_past": "Pasatu da", + "gui.createrailwaysnavigator.saved_routes.today": "Gaur", + "gui.createrailwaysnavigator.saved_routes.tomorrow": "Bihar", + "gui.createrailwaysnavigator.saved_routes.in_days": "%s egunen barru", + "gui.createrailwaysnavigator.saved_route_widget.show_details": "Erakutsi Xehetasunak", + "gui.createrailwaysnavigator.saved_route_widget.share": "Partekatu...", + "gui.createrailwaysnavigator.saved_route_widget.notifications": "Erakutssi Jakinarazpenak", + "gui.createrailwaysnavigator.train_status.unknown_delay": "Eragiketen atzerapena", + "gui.createrailwaysnavigator.train_status.delay_previous_journey": "Aurretiko ibilbide batean atzeratua", + "gui.createrailwaysnavigator.train_status.red_signal": "Seinale gorria", + "gui.createrailwaysnavigator.train_status.priority_other_train": "Beste tren batek du lehentasuna.", + "gui.createrailwaysnavigator.train_status.delay_other_train": "Beste tren batek eragindako atzerapena.", + "gui.createrailwaysnavigator.train_status.track_closed": "Trenbidea zarratua.", + "gui.createrailwaysnavigator.train_status.staff_shortage": "Langile falta", + "gui.createrailwaysnavigator.train_status.operational_disruption": "Etenaldi teknikoa", + "gui.createrailwaysnavigator.train_status.special_trip": "Bidai berezia", + "gui.createrailwaysnavigator.route_details.save_route.tooltip": "Ibilbidea gorde", + "gui.createrailwaysnavigator.route_details.remove_route.tooltip": "Ibilbidea ezabatu", + "gui.createrailwaysnavigator.route_details.show_popup.tooltip": "Popup-a Erakutsi", + "gui.createrailwaysnavigator.navigator.my_profile": "Nire perfila", + "gui.createrailwaysnavigator.navigator.train_initialization_warning": "Zenbait ibilbide osatugabeak edo ez gomendatuak izan daitezke Create Railways Navigator-ek ez baititu tren guztiak hasieratu.", + "gui.createrailwaysnavigator.global_settings.train_line.title": "Tren Lineak", + "gui.createrailwaysnavigator.global_settings.train_line.color": "Hautatu Kolorea", + "gui.createrailwaysnavigator.global_settings.train_line.description": "Tren lineak sortu hainbat tren ezberdin talde berean sartzeko. Pantailetan eta euren ezarpen orokorretan erreflexatuko da. (Ordutegian dauden trenetan soilik ezarri daiteke)" +} diff --git a/common/src/main/resources/assets/createrailwaysnavigator/lang/fr_fr.json b/common/src/main/resources/assets/createrailwaysnavigator/lang/fr_fr.json index 33f6046e..e76f303b 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/lang/fr_fr.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/lang/fr_fr.json @@ -1,59 +1,49 @@ { "advancement.createrailwaysnavigator.navigator": "Merci d'avoir voyagé", - "advancement.createrailwaysnavigator.navigator.description": "Crafter un Navigateur pour trouver une connection entre une station et une autre.", + "advancement.createrailwaysnavigator.navigator.description": "Crafter un Navigateur pour trouver une connection entre une station et une autre.", "advancement.createrailwaysnavigator.advanced_display": "Pas vraiment 4k", "advancement.createrailwaysnavigator.advanced_display.description": "Améliorer vos tableaux d'affichage pour afficher plus d'information et même les placer dans vos trains.", - - "itemGroup.createrailwaysnavigator.tab": "Create Railways Navigator", - "item.createrailwaysnavigator.navigator": "Create Navigateur Ferroviaire", - "item.createrailwaysnavigator.navigator.tooltip.summary": "Le _navigateur_ montre les _correspondances_ possibles avec des informations supplémentaires comme les _escales_, des _informations en temps réel_ et plus encore.", - + "item.createrailwaysnavigator.navigator.tooltip.summary": "Le _navigateur_ montre les _correspondances_ possibles avec des informations supplémentaires comme les _escales_, des _informations en temps réel_ et plus encore.", "block.createrailwaysnavigator.train_station_clock": "Horloge de Gare", "block.createrailwaysnavigator.advanced_display_block": "Bloc d'Affichage Avancé", - "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "Utilisez-le sur des _trains_, comme _affichage de la destination_ ou _affichage pour les passagers_, ou dans des _stations de trains_ comme des _affichage de quai_ amélioré qui montre plus d'informations que des tableaux d'affichage classique.", + "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "Utilisez-le sur des _trains_, comme _affichage de la destination_ ou _affichage pour les passagers_, ou dans des _stations de trains_ comme des _affichage de quai_ amélioré qui montre plus d'informations que des tableaux d'affichage classique.", "block.createrailwaysnavigator.advanced_display_block.tooltip.condition1": "Quand click-droit en utilisant une clé", - "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "Ouvre un menu pour _configurer_ l'_affichage_.", + "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "Ouvre un menu pour _configurer_ l'_affichage_.", "block.createrailwaysnavigator.advanced_display": "Tableau d'Affichage Avancé", - "block.createrailwaysnavigator.advanced_display.tooltip.summary": "Utilisez-le sur des _trains_, comme _affichage de la destination_ ou _affichage pour les passagers_, ou dans des _stations de trains_ comme des _affichage de quai_ amélioré qui montre plus d'informations que des tableaux d'affichage classique.", + "block.createrailwaysnavigator.advanced_display.tooltip.summary": "Utilisez-le sur des _trains_, comme _affichage de la destination_ ou _affichage pour les passagers_, ou dans des _stations de trains_ comme des _affichage de quai_ amélioré qui montre plus d'informations que des tableaux d'affichage classique.", "block.createrailwaysnavigator.advanced_display.tooltip.condition1": "Quand click-droit en utilisant une clé", - "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "Ouvre un menu pour _configurer_ l'_affichage_.", + "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "Ouvre un menu pour _configurer_ l'_affichage_.", "block.createrailwaysnavigator.advanced_display_small": "Petit Tableau d'Affichage Avancé", - "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "Utilisez-le sur des _trains_, comme _affichage de la destination_ ou _affichage pour les passagers_, ou dans des _stations de trains_ comme des _affichage de quai_ amélioré qui montre plus d'informations que des tableaux d'affichage classique.", + "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "Utilisez-le sur des _trains_, comme _affichage de la destination_ ou _affichage pour les passagers_, ou dans des _stations de trains_ comme des _affichage de quai_ amélioré qui montre plus d'informations que des tableaux d'affichage classique.", "block.createrailwaysnavigator.advanced_display_small.tooltip.condition1": "Quand click-droit en utilisant une clé", - "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "Ouvre un menu pour _configurer_ l'_affichage_.", + "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "Ouvre un menu pour _configurer_ l'_affichage_.", "block.createrailwaysnavigator.advanced_display_panel": "Panneau d'Affichage Avancé", - "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "Utilisez-le sur des _trains_, comme _affichage de la destination_ ou _affichage pour les passagers_, ou dans des _stations de trains_ comme des _affichage de quai_ amélioré qui montre plus d'informations que des tableaux d'affichage classique.", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "Utilisez-le sur des _trains_, comme _affichage de la destination_ ou _affichage pour les passagers_, ou dans des _stations de trains_ comme des _affichage de quai_ amélioré qui montre plus d'informations que des tableaux d'affichage classique.", "block.createrailwaysnavigator.advanced_display_panel.tooltip.condition1": "Quand click-droit en utilisant une clé", - "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "Ouvre un menu pour _configurer_ l'_affichage_.", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "Ouvre un menu pour _configurer_ l'_affichage_.", "block.createrailwaysnavigator.advanced_display_half_panel": "Demi-Panneau d'Affichage Avancé", - "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "Utilisez-le sur des _trains_, comme _affichage de la destination_ ou _affichage pour les passagers_, ou dans des _stations de trains_ comme des _affichage de quai_ amélioré qui montre plus d'informations que des tableaux d'affichage classique.", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "Utilisez-le sur des _trains_, comme _affichage de la destination_ ou _affichage pour les passagers_, ou dans des _stations de trains_ comme des _affichage de quai_ amélioré qui montre plus d'informations que des tableaux d'affichage classique.", "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.condition1": "Quand click-droit en utilisant une clé", - "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "Ouvre un menu pour _configurer_ l'_affichage_.", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "Ouvre un menu pour _configurer_ l'_affichage_.", "block.createrailwaysnavigator.advanced_display_sloped": "Affichage Incliné Avancé", - "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "Utilisez-le sur des _trains_, comme _affichage de la destination_ ou _affichage pour les passagers_, ou dans des _stations de trains_ comme des _affichage de quai_ amélioré qui montre plus d'informations que des tableaux d'affichage classique.", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "Utilisez-le sur des _trains_, comme _affichage de la destination_ ou _affichage pour les passagers_, ou dans des _stations de trains_ comme des _affichage de quai_ amélioré qui montre plus d'informations que des tableaux d'affichage classique.", "block.createrailwaysnavigator.advanced_display_sloped.tooltip.condition1": "Quand click-droit en utilisant une clé", - "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "Ouvre un menu pour _configurer_ l'_affichage_.", - + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "Ouvre un menu pour _configurer_ l'_affichage_.", "block.createrailwaysnavigator.advanced_display.ber.not_in_service": "Hors service!", - "block.createrailwaysnavigator.advanced_display.ber.shunting_trip": "train sans passagers", - - "category.createrailwaysnavigator.crn": "Create Railways Navigator", + "category.createrailwaysnavigator.crn": "Créer un navigateur ferroviaire", "key.createrailwaysnavigator.route_overlay_options": "Afficher les Options de l'Overlay d'Itinéraire", - "enum.createrailwaysnavigator.overlay_position": "Position de l'Affichage", "enum.createrailwaysnavigator.overlay_position.info.top_left": "Coin Supérieur Gauche", "enum.createrailwaysnavigator.overlay_position.info.top_right": "Coin Supérieur Droit", "enum.createrailwaysnavigator.overlay_position.info.bottom_left": "Coin Inférieur Gauche", "enum.createrailwaysnavigator.overlay_position.info.bottom_right": "Coin Inférieur Droit", - "gui.createrailwaysnavigator.loading.title": "Téléchargement des données du serveur...", - "gui.createrailwaysnavigator.overlay_settings.title": "Paramètres de l'Overlay d'Itinéraire", "gui.createrailwaysnavigator.route_overlay_settings.show_details": "Afficher les détails", "gui.createrailwaysnavigator.route_overlay_settings.unpin": "Enlever l'overlay d'itinéraire", "gui.createrailwaysnavigator.route_overlay_settings.narrator.on": "Annonces du narrateur activées.", - "gui.createrailwaysnavigator.route_overlay_settings.narrator.off": "Annonces du narrateur désactivées.", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.off": "Annonces du narrateur désactivées.", "gui.createrailwaysnavigator.route_overlay_settings.notifications.on": "Notifications activées", "gui.createrailwaysnavigator.route_overlay_settings.notifications.off": "Notifications désactivées", "gui.createrailwaysnavigator.route_overlay_settings.scale": "Taille de l'interface", @@ -61,7 +51,6 @@ "gui.createrailwaysnavigator.route_overlay_settings.narrator.description": "Le Narrateur annonce des évènements importants pendant votre voyage, ex. le prochain arrêt, des changements, etc.", "gui.createrailwaysnavigator.route_overlay_settings.notifications": "Notifications", "gui.createrailwaysnavigator.route_overlay_settings.notifications.description": "Recevez des notifications pop-up sur les évènements importants de votre voyage, ex. le prochain arrêt, des changements, etc.", - "gui.createrailwaysnavigator.common.expand": "Afficher les détails", "gui.createrailwaysnavigator.common.collapse": "Cacher les détails", "gui.createrailwaysnavigator.common.go_back": "Retour", @@ -71,10 +60,11 @@ "gui.createrailwaysnavigator.common.true": "Oui", "gui.createrailwaysnavigator.common.false": "Non", "gui.createrailwaysnavigator.common.search": "Rechercher", - "gui.createrailwaysnavigator.common.auto": "Auto", + "gui.createrailwaysnavigator.common.auto": "Automatique", "gui.createrailwaysnavigator.common.server_error": "Erreur serveur lors de l'éxecution de la tâche. Regarder la console pour en savoir plus.", - - "gui.createrailwaysnavigator.navigator.title": "Create Railways Navigator", + "gui.createrailwaysnavigator.common.delete": "Supprimer", + "gui.createrailwaysnavigator.common.add": "Ajouter", + "gui.createrailwaysnavigator.common.help": "Obtenir de l’aide", "gui.createrailwaysnavigator.navigator.no_connections": "Aucun itinéraire trouvé.", "gui.createrailwaysnavigator.navigator.not_searched": "Rien n'a encore été recherché.", "gui.createrailwaysnavigator.navigator.searching": "Recherche d'un itinéraire...", @@ -89,13 +79,10 @@ "gui.createrailwaysnavigator.navigator.search.tooltip": "Recherche", "gui.createrailwaysnavigator.navigator.location.tooltip": "Gare la plus proche de votre position", "gui.createrailwaysnavigator.navigator.switch.tooltip": "Inverser le point de départ et la destination", - "gui.createrailwaysnavigator.route_details.title": "Détail de l'itinéraire", "gui.createrailwaysnavigator.route_details.departure": "Départ dans", "gui.createrailwaysnavigator.route_details.next_transfer_time": "Correspondance dans", "gui.createrailwaysnavigator.route_details.transfer": "Correspondance", - "gui.createrailwaysnavigator.route_details.save_route": "Enregistrer l'itinéraire'", - "gui.createrailwaysnavigator.route_overview.title": "Détail de l'itinéraire", "gui.createrailwaysnavigator.route_overview.journey_begins": "Votre voyage commence! %s à %s, départ %s", "gui.createrailwaysnavigator.route_overview.journey_begins_with_platform": "Votre voyage commence! %s à %s, départ %s sur la voie %s", @@ -138,7 +125,6 @@ "gui.createrailwaysnavigator.route_overview.notification.journey_completed.title": "Vous avez atteint votre destination !", "gui.createrailwaysnavigator.route_overview.notification.journey_completed": "Merci d'avoir voyagé et passez une bonne journée", "gui.createrailwaysnavigator.route_overview.date": "Jour %s, %s", - "gui.createrailwaysnavigator.global_settings.title": "Paramètres globaux", "gui.createrailwaysnavigator.global_settings.option.tooltip": "Cliquez ici pour modifier", "gui.createrailwaysnavigator.global_settings.option_alias.title": "Balises de Gare", @@ -149,8 +135,6 @@ "gui.createrailwaysnavigator.global_settings.train_group.description": "Créez des groupes de trains pour les organiser (ex. services régionaux, services longue distance, ...). Les utilisateurs peuvent décider quels groupes ils souhaitent utiliser.", "gui.createrailwaysnavigator.global_settings.train_blacklist.title": "Liste Noire de Train", "gui.createrailwaysnavigator.global_settings.train_blacklist.description": "Exclure des trains, ex. trains de marchandises, trains spéciaux, etc., de manière à ce qu'ils ne puissent être utilisé dans des itinéraires.", - - "gui.createrailwaysnavigator.station_tags.title": "Paramètres des Balises de Gares", "gui.createrailwaysnavigator.station_tags.summary": "Contient %s Gares", "gui.createrailwaysnavigator.station_tags.editor": "Modifié par %s le %s", "gui.createrailwaysnavigator.station_tags.add.tooltip": "Créer une nouvelle entrée", @@ -160,22 +144,18 @@ "gui.createrailwaysnavigator.station_tags.hint.station_name": "Nom de la Station", "gui.createrailwaysnavigator.station_tags.hint.platform": "Quai", "gui.createrailwaysnavigator.station_tags.enter_name": "Entrer un nom ici", - "gui.createrailwaysnavigator.train_group_settings.title": "Paramètres des Groupes de Trains", "gui.createrailwaysnavigator.train_group_settings.summary": "Contient %s Trains", "gui.createrailwaysnavigator.train_group_settings.editor": "Modifié par %s le %s", "gui.createrailwaysnavigator.train_group_settings.delete_alias.tooltip": "Supprimer le Groupe", "gui.createrailwaysnavigator.train_group_settings.delete_station.tooltip": "Retirer le Train", "gui.createrailwaysnavigator.train_group_settings.add_station.tooltip": "Ajouter un Train", - "gui.createrailwaysnavigator.blacklist.title": "Liste noire des Gares", "gui.createrailwaysnavigator.blacklist.add.tooltip": "Ajouter à la liste noire", "gui.createrailwaysnavigator.blacklist.delete.tooltip": "Retirer de la liste noire", - "gui.createrailwaysnavigator.train_blacklist.title": "Liste noire des Trains", "gui.createrailwaysnavigator.train_blacklist.add.tooltip": "Ajouter à la liste noire", "gui.createrailwaysnavigator.train_blacklist.delete.tooltip": "Retirer de la liste noire", - "gui.createrailwaysnavigator.search_settings.title": "Paramètres de recherche", "gui.createrailwaysnavigator.search_settings.transfer_time": "Temps de Correspondance Minimum", "gui.createrailwaysnavigator.search_settings.transfer_time.description": "Le temps minimum qui devrait être disponible pour changer de train. (1h ~ 50 secondes réelles)", @@ -185,38 +165,29 @@ "gui.createrailwaysnavigator.search_settings.train_groups.overview.all": "Tous", "gui.createrailwaysnavigator.search_settings.train_groups.overview.none": "Aucun", "gui.createrailwaysnavigator.search_settings.train_groups.tooltip.reset": "Réinitialiser les filtres", - "gui.createrailwaysnavigator.new_text_entry.add.tooltip": "Ajouter", - "gui.createrailwaysnavigator.time": "Temps: %s", "gui.createrailwaysnavigator.time.now": "maintenant", "gui.createrailwaysnavigator.time_format.dhm": "%s jours %s h. %s m.", "gui.createrailwaysnavigator.time_format.hm": "%s h. %s min.", "gui.createrailwaysnavigator.time_format.m": "%s m.", - "gui.createrailwaysnavigator.platform": "Voie", "gui.createrailwaysnavigator.departure": "Départ", - "gui.createrailwaysnavigator.destination": "Destination", "gui.createrailwaysnavigator.line": "Ligne", "gui.createrailwaysnavigator.following_trains": "Trains suivants:", - "gui.createrailwaysnavigator.via": "via", - "gui.createrailwaysnavigator.advanced_display_settings.title": "Paramètres des Affichages Avancés", "gui.createrailwaysnavigator.advanced_display_settings.display_type": "Type d'Affichage", "gui.createrailwaysnavigator.advanced_display_settings.display_type.description": "Détermine les informations affichés.", "gui.createrailwaysnavigator.advanced_display_settings.info_type": "Type d'Information", "gui.createrailwaysnavigator.advanced_display_settings.info_type.description": "Détermine le degré de détail des informations.", "gui.createrailwaysnavigator.advanced_display_settings.double_sided": "Double-face", - "enum.createrailwaysnavigator.display_info_type": "Type d'Affiche d'Information", "enum.createrailwaysnavigator.display_info_type.description": "Détermine combien d'informations devraient être affichés sur votre tableau d'affichage.", - "enum.createrailwaysnavigator.display_info_type.simple": "Simple", "enum.createrailwaysnavigator.display_info_type.info.simple": "L'écran va seulement afficher les informations les plus importantes sans détails supplémentaires.", "enum.createrailwaysnavigator.display_info_type.detailed": "Détaillé", "enum.createrailwaysnavigator.display_info_type.info.detailed": "Les informations les plus importantes avec quelques détails seront affichés, comme la vitesse du trains, les escales, etc.", "enum.createrailwaysnavigator.display_info_type.informative": "Informatif", "enum.createrailwaysnavigator.display_info_type.info.informative": "Affiche toutes les informations qui pourraient être intéressantes et les affiches dans une disposition agréable. Déconseillé pour les petits petits affichages car le texte peu devenir très petit.", - "enum.createrailwaysnavigator.display_type": "Type d'Affichage", "enum.createrailwaysnavigator.display_type.description": "Le type d'affiche en fonction de son objectif.", "enum.createrailwaysnavigator.display_type.train_destination": "Destination du Train", @@ -225,26 +196,20 @@ "enum.createrailwaysnavigator.display_type.info.passenger_information": "Représentes les écrans présents à l'interieur des trains. Ces écrans afficheront les prochains arrêts, la direction de la sortie et (si séléctionés) la vitesse du train et une vue d'ensemble de la route", "enum.createrailwaysnavigator.display_type.platform": "Affichage de quai", "enum.createrailwaysnavigator.display_type.info.platform": "Ces écrans doivent être utilisés sur les quais des gares et montre les prochains trains arrivant avec quelques détails en plus si séléctionés. Ne peut pas être utilisés à l'intérieur des trains!", - "enum.createrailwaysnavigator.side": "Face", "enum.createrailwaysnavigator.side.description": "La face du bloc où les informations devraient être affichés.", "enum.createrailwaysnavigator.side.front": "Face avant", "enum.createrailwaysnavigator.side.info.front": "Les informations seront affichés uniquement sur la face avant du bloc. C'est le comportement par défaut.", "enum.createrailwaysnavigator.side.both": "Toutes les faces", "enum.createrailwaysnavigator.side.info.both": "Les informations seront affichés sur toutes les faces.", - "enum.createrailwaysnavigator.time_display": "Affichage des horaires", "enum.createrailwaysnavigator.time_display.description": "Détermines comment les horaires devraient être affichés", - "enum.createrailwaysnavigator.time_display.abs": "ABS", "enum.createrailwaysnavigator.time_display.info.abs": "ABS (absolu)", - "enum.createrailwaysnavigator.time_display.eta": "ETA", "enum.createrailwaysnavigator.time_display.info.eta": "ETA (estimation du temps d'arrivée)", - "create.display_source.advanced_display": "Affichage Avancé", "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width": "Largeur de la colonne du nom du train", "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description": "en pixels bloc. (Defaut: 16)", "gui.createrailwaysnavigator.display_source.advanced_display.platform_width": "Largeur de la colonne du quai", "gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description": "en pixel bloc. (Defaut: Auto)", - - "createrailwaysnavigator.moin": "moin" + "gui.createrailwaysnavigator.station_tags.title": "Paramètres des Balises de Gares" } diff --git a/common/src/main/resources/assets/createrailwaysnavigator/lang/it_it.json b/common/src/main/resources/assets/createrailwaysnavigator/lang/it_it.json new file mode 100644 index 00000000..4716a854 --- /dev/null +++ b/common/src/main/resources/assets/createrailwaysnavigator/lang/it_it.json @@ -0,0 +1,315 @@ +{ + "advancement.createrailwaysnavigator.navigator": "Grazie per il viaggio", + "advancement.createrailwaysnavigator.navigator.description": "Abbozza viaggio onde cercare collegamenti ferroviari tra le stazioni.", + "advancement.createrailwaysnavigator.advanced_display": "Non abbastanza 4k", + "advancement.createrailwaysnavigator.advanced_display.description": "Aggiorna le schede di visione per vedere più informazioni e posizionarle nei treni.", + "item.createrailwaysnavigator.navigator": "Crea viaggio in ferrovia", + "item.createrailwaysnavigator.navigator.tooltip.summary": "Il _navigatore_ mostra possibili _collegamenti via treno_ con informazioni aggiuntive come _tappe_, _dati in tempo reale_ e altro ancora.", + "block.createrailwaysnavigator.train_station_clock": "Orologio stazione", + "block.createrailwaysnavigator.advanced_display_block": "Visione avanzata", + "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "Usalo su _treni_, come _schermata di destinazione_ del treno o _schermo informativo per il passeggero_, o alle _stazioni_ come _schermo_ migliorato, che mostra anche più informazioni rispetto alle normali schede di visualizzazione.", + "block.createrailwaysnavigator.advanced_display_block.tooltip.condition1": "Se cliccato col destro usando chiave inglese", + "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "Apre un menu' per _configurare_ lo _schermo_.", + "block.createrailwaysnavigator.advanced_display": "Tavola schermo avanzato", + "block.createrailwaysnavigator.advanced_display.tooltip.summary": "Usalo su _treni_, come _schermata di destinazione_ del treno o _schermo informativo per il passeggero_, o alle _stazioni_ come _schermo_ migliorato, che mostra anche più informazioni rispetto alle normali schede di visualizzazione.", + "block.createrailwaysnavigator.advanced_display.tooltip.condition1": "Se cliccato col destro usando chiave inglese", + "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "Apre un menu' per _configurare_ lo _schermo_.", + "block.createrailwaysnavigator.advanced_display_small": "Display avanzato piccolo", + "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "Usalo su _treni_, come _schermata di destinazione_ del treno o _schermo informativo per il passeggero_, o alle _stazioni_ come _schermo_ migliorato, che mostra anche più informazioni rispetto alle normali schede di visualizzazione.", + "block.createrailwaysnavigator.advanced_display_small.tooltip.condition1": "Se cliccato col destro usando chiave inglese", + "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "Apre un menu' per _configurare_ lo _schermo_.", + "block.createrailwaysnavigator.advanced_display_panel": "Pannello visione avanzata", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "Usalo su _treni_, come _schermata di destinazione_ del treno o _schermo informativo per il passeggero_, o alle _stazioni_ come _schermo_ migliorato, che mostra anche più informazioni rispetto alle normali schede di visualizzazione.", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.condition1": "Se cliccato col destro usando chiave inglese", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "Apre un menu' per _configurare_ lo _schermo_.", + "block.createrailwaysnavigator.advanced_display_half_panel": "Pannello schermo avanzato dimezzato", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "Usalo su _treni_, come _schermata di destinazione_ del treno o _schermo informativo per il passeggero_, o alle _stazioni_ come _schermo_ migliorato, che mostra anche più informazioni rispetto alle normali schede di visualizzazione.", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.condition1": "Se cliccato col destro usando chiave inglese", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "Apre un menu' per _configurare_ lo _schermo_.", + "block.createrailwaysnavigator.advanced_display_sloped": "Pannello visione avanzata inclinato", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "Usalo su _treni_, come _schermata di destinazione_ del treno o _schermo informativo per il passeggero_, o alle _stazioni_ come _schermo_ migliorato, che mostra anche più informazioni rispetto alle normali schede di visualizzazione.", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.condition1": "Se cliccato col destro usando chiave inglese", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "Apre un menu' per _configurare_ lo _schermo_.", + "block.createrailwaysnavigator.advanced_display_slab": "Visione avanzata a soletta", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.summary": "Usalo su _treni_, come _schermata di destinazione_ del treno o _schermo informativo per il passeggero_, o alle _stazioni_ come _schermo_ migliorato, che mostra anche più informazioni rispetto alle normali schede di visualizzazione.", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.condition1": "Se cliccato col destro usando chiave inglese", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.behaviour1": "Apre un menu' per _configurare_ lo _schermo_.", + "block.createrailwaysnavigator.advanced_display.ber.not_in_service": "Fuori servizio!", + "category.createrailwaysnavigator.crn": "Crea viaggio in ferrovia", + "key.createrailwaysnavigator.route_overlay_options": "Mostra opzioni sovrapposizione percorso", + "enum.createrailwaysnavigator.overlay_position": "Posizione schermo", + "enum.createrailwaysnavigator.overlay_position.info.top_left": "Angolo superiore sinistro", + "enum.createrailwaysnavigator.overlay_position.info.top_right": "Angolo superiore destro", + "enum.createrailwaysnavigator.overlay_position.info.bottom_left": "Angolo inferiore sinistro", + "enum.createrailwaysnavigator.overlay_position.info.bottom_right": "Angolo inferiore destro", + "gui.createrailwaysnavigator.loading.title": "Scaricamento dati dal server…", + "gui.createrailwaysnavigator.overlay_settings.title": "Impostazioni sovrapposizione percorso", + "gui.createrailwaysnavigator.route_overlay_settings.show_details": "Mostra dettagli", + "gui.createrailwaysnavigator.route_overlay_settings.unpin": "Rimuovi sovrapposizione percorso", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.on": "Annunci narrati abilitati.", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.off": "Annunci narrati disabilitati.", + "gui.createrailwaysnavigator.route_overlay_settings.notifications.on": "Notifiche abilitate", + "gui.createrailwaysnavigator.route_overlay_settings.notifications.off": "Notifiche disabilitate", + "gui.createrailwaysnavigator.route_overlay_settings.scale": "Scala GUI", + "gui.createrailwaysnavigator.route_overlay_settings.narrator": "Annunci narrati", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.description": "Il narratore annuncia eventi importanti nel tuo viaggio, es. prossima fermata, cambiamenti, ecc.", + "gui.createrailwaysnavigator.route_overlay_settings.notifications": "Notifiche", + "gui.createrailwaysnavigator.route_overlay_settings.notifications.description": "Ricevi notifiche sugli eventi importanti durante il tuo viaggio, es. prossima fermata, modifiche, ecc.", + "gui.createrailwaysnavigator.common.expand": "Mostra dettagli", + "gui.createrailwaysnavigator.common.collapse": "Nascondi dettagli", + "gui.createrailwaysnavigator.common.go_back": "Torna indietro", + "gui.createrailwaysnavigator.common.go_to_top": "Scorri in alto", + "gui.createrailwaysnavigator.common.reset_defaults": "Ripristina predefinito", + "gui.createrailwaysnavigator.common.count": "Conta", + "gui.createrailwaysnavigator.common.true": "Sì", + "gui.createrailwaysnavigator.common.false": "No", + "gui.createrailwaysnavigator.common.search": "Cerca", + "gui.createrailwaysnavigator.common.auto": "Auto", + "gui.createrailwaysnavigator.common.server_error": "Errore server durante esecuzione attività. Guarda console per dettagli.", + "gui.createrailwaysnavigator.common.delete": "Elimina", + "gui.createrailwaysnavigator.common.add": "Aggiungi", + "gui.createrailwaysnavigator.common.help": "Chiedi aiuto", + "gui.createrailwaysnavigator.navigator.title": "Crea viaggio in ferrovia", + "gui.createrailwaysnavigator.navigator.no_connections": "Nessuna connessione trovata.", + "gui.createrailwaysnavigator.navigator.not_searched": "Ancora nessuna ricerca.", + "gui.createrailwaysnavigator.navigator.searching": "Cerca connessioni…", + "gui.createrailwaysnavigator.navigator.error_title": "Impossibile percorrere!", + "gui.createrailwaysnavigator.navigator.start_end_null": "Partenza o destinazione vuoti.", + "gui.createrailwaysnavigator.navigator.start_end_equal": "Partenza e destinazione uguali.", + "gui.createrailwaysnavigator.navigator.route_entry.connection_in_past": "❌ Connessione in passato", + "gui.createrailwaysnavigator.navigator.route_entry.transfer": "Trasf.", + "gui.createrailwaysnavigator.navigator.route_entry.station_start": "da %s", + "gui.createrailwaysnavigator.navigator.global_settings.tooltip": "Impostazioni globali", + "gui.createrailwaysnavigator.navigator.search_settings.tooltip": "Impostazioni di ricerca", + "gui.createrailwaysnavigator.navigator.search.tooltip": "Cerca", + "gui.createrailwaysnavigator.navigator.location.tooltip": "Stazione più vicina dalla posizione corrente", + "gui.createrailwaysnavigator.navigator.refresh.tooltip": "Ricarica", + "gui.createrailwaysnavigator.navigator.switch.tooltip": "Cambia campi", + "gui.createrailwaysnavigator.route_details.title": "Dettagli percorso", + "gui.createrailwaysnavigator.route_details.departure": "Partenza tra", + "gui.createrailwaysnavigator.route_details.next_transfer_time": "Trasferimento in", + "gui.createrailwaysnavigator.route_details.transfer": "Navetta", + "gui.createrailwaysnavigator.route_overview.title": "Compagno di viaggio", + "gui.createrailwaysnavigator.route_overview.journey_begins": "Il tuo viaggio inizia! Da %s a %s, partenza %s", + "gui.createrailwaysnavigator.route_overview.journey_begins_with_platform": "Il tuo viaggio inizia! Treno da %s a %s, partenza %s dal binario %s", + "gui.createrailwaysnavigator.route_overview.train_details": "Da %s a %s", + "gui.createrailwaysnavigator.route_overview.next_stop": "Prossima fermata:%s", + "gui.createrailwaysnavigator.route_overview.transfer": "Cambia %s → %s", + "gui.createrailwaysnavigator.route_overview.transfer_with_platform": "Cambia %s → %s sulla piattaforma %s", + "gui.createrailwaysnavigator.route_overview.journey_completed": "Viaggio completato", + "gui.createrailwaysnavigator.route_overview.after_journey": "Hai raggiunto %s. Grazie per aver viaggiato con noi e buona giornata.", + "gui.createrailwaysnavigator.route_overview.next_connections": "Prossime connessioni", + "gui.createrailwaysnavigator.route_overview.schedule_transfer": "Navetta", + "gui.createrailwaysnavigator.route_overview.train_cancelled": "Treno cancellato", + "gui.createrailwaysnavigator.route_overview.train_cancellation_info": "Informazioni su %s", + "gui.createrailwaysnavigator.route_overview.stop_cancelled": "❌ Cancellata", + "gui.createrailwaysnavigator.route_overview.connection_endangered": "Connessione in stato di pericolo", + "gui.createrailwaysnavigator.route_overview.connection_missed": "Connessione mancata", + "gui.createrailwaysnavigator.route_overview.connection_cancelled": "Treno cancellato", + "gui.createrailwaysnavigator.route_overview.journey_interrupted": "Il tuo viaggio verso %s non può continuare.", + "gui.createrailwaysnavigator.route_overview.connection_missed_info": "A causa di un ritardo del treno hai perso il tuo treno di collegamento. Cerca un'alternativa nel navigatore. Ci scusiamo per l'inconveniente.", + "gui.createrailwaysnavigator.route_overview.train_cancelled_info": "Informazioni su %s: Questo treno è oggi cancellato! Ci scusiamo per l'inconveniente. Cerca un'alternativa nel navigatore.", + "gui.createrailwaysnavigator.route_overview.train_cancelled_title": "Il treno è stato cancellato", + "gui.createrailwaysnavigator.route_overview.journey_interrupted_info": "Il tuo viaggio per %s non può continuare. Cerca un'alternativa nel navigatore.", + "gui.createrailwaysnavigator.route_overview.options": "Premi %s per opzioni.", + "gui.createrailwaysnavigator.route_overview.notification.journey_begins.title": "Il tuo viaggio verso %s ha inizio!", + "gui.createrailwaysnavigator.route_overview.notification.journey_begins": "Da %s a %s, partenza %s", + "gui.createrailwaysnavigator.route_overview.notification.journey_begins_with_platform": "Da %s a %s, partenza %s dal binario %s", + "gui.createrailwaysnavigator.route_overview.notification.platform_changed.title": "Il binario è cambiato!", + "gui.createrailwaysnavigator.route_overview.notification.platform_changed": "Il tuo treno in %s parte oggi dal binario %s.", + "gui.createrailwaysnavigator.route_overview.notification.train_delayed.title": "%s: arrivo a %s in ritardo.", + "gui.createrailwaysnavigator.route_overview.notification.train_delayed": "%s invece di %s in %s", + "gui.createrailwaysnavigator.route_overview.notification.train_cancelled.title": "%s: treno cancellato", + "gui.createrailwaysnavigator.route_overview.notification.train_cancelled": "Treno da %s a %s oggi cancellato.", + "gui.createrailwaysnavigator.route_overview.notification.transfer.title": "Trasferimento in arrivo", + "gui.createrailwaysnavigator.route_overview.notification.transfer": "Cambia %s → %s", + "gui.createrailwaysnavigator.route_overview.notification.transfer_with_platform": "Cambia %s → %s sulla piattaforma %s", + "gui.createrailwaysnavigator.route_overview.notification.connection_endangered.title": "Collegamento in pericolo!", + "gui.createrailwaysnavigator.route_overview.notification.connection_endangered": "Probabilmente non potrai raggiungere %s a %s.", + "gui.createrailwaysnavigator.route_overview.notification.connection_missed.title": "Collegamento perso", + "gui.createrailwaysnavigator.route_overview.notification.connection_missed": "Hai perso il tuo treno di collegamento da %s per %s.", + "gui.createrailwaysnavigator.route_overview.notification.journey_completed.title": "Hai raggiunto la tua destinazione!", + "gui.createrailwaysnavigator.route_overview.notification.journey_completed": "Grazie per aver viaggiato con noi e buona giornata", + "gui.createrailwaysnavigator.route_overview.date": "Giorno %s, %s", + "gui.createrailwaysnavigator.global_settings.title": "Impostazioni globali", + "gui.createrailwaysnavigator.global_settings.option.tooltip": "Clicca per modificare", + "gui.createrailwaysnavigator.global_settings.option_alias.title": "Etichette stazione", + "gui.createrailwaysnavigator.global_settings.option_alias.description": "Combinare le singole stazioni ferroviarie in un'unica stazione a più binari con il proprio nome in modo che il navigatore possa suggerire trasferimenti e altro ancora.", + "gui.createrailwaysnavigator.global_settings.option_blacklist.title": "Lista nera delle stazioni", + "gui.createrailwaysnavigator.global_settings.option_blacklist.description": "Escludi le stazioni ferroviarie che non devono apparire nei risultati di navigazione. Queste stazioni saranno ignorate quando si generano itinerari.", + "gui.createrailwaysnavigator.global_settings.train_group.title": "Gruppi di treni", + "gui.createrailwaysnavigator.global_settings.train_group.description": "Crea gruppi di treni per organizzare tutti i treni (es. servizi regionali, servizi a lunga distanza...). Gli utenti possono decidere quali gruppi di treni vogliono usare.", + "gui.createrailwaysnavigator.global_settings.train_blacklist.title": "Lista nera dei treni", + "gui.createrailwaysnavigator.global_settings.train_blacklist.description": "Escludi i treni, es. treni merci, treni speciali, ecc., in modo che non siano usati nelle indicazioni del percorso.", + "gui.createrailwaysnavigator.station_tags.summary": "Contiene %s stazioni ferroviarie", + "gui.createrailwaysnavigator.station_tags.editor": "Ultima modifica di %s il %s", + "gui.createrailwaysnavigator.station_tags.add.tooltip": "Crea nuova voce", + "gui.createrailwaysnavigator.station_tags.delete_alias.tooltip": "Elimina etichetta", + "gui.createrailwaysnavigator.station_tags.delete_station.tooltip": "Rimuovi stazione", + "gui.createrailwaysnavigator.station_tags.modify_platform.tooltip": "Clicca per modificare", + "gui.createrailwaysnavigator.station_tags.add_station.tooltip": "Aggiungi stazione", + "gui.createrailwaysnavigator.station_tags.hint.station_name": "Nome stazione ferroviaria", + "gui.createrailwaysnavigator.station_tags.hint.platform": "Etichetta binario", + "gui.createrailwaysnavigator.station_tags.enter_name": "Immetti nome qui", + "gui.createrailwaysnavigator.train_group_settings.title": "Impostazioni gruppo treni", + "gui.createrailwaysnavigator.train_group_settings.summary": "Contiene %s treni", + "gui.createrailwaysnavigator.train_group_settings.editor": "Ultima modifica di %s il %s", + "gui.createrailwaysnavigator.train_group_settings.delete_alias.tooltip": "Elimina gruppo", + "gui.createrailwaysnavigator.train_group_settings.delete_station.tooltip": "Rimuovi treno", + "gui.createrailwaysnavigator.train_group_settings.add_station.tooltip": "Aggiungi treno", + "gui.createrailwaysnavigator.blacklist.title": "Lista nera delle stazioni", + "gui.createrailwaysnavigator.blacklist.add.tooltip": "Aggiungi a lista nera", + "gui.createrailwaysnavigator.blacklist.delete.tooltip": "Rimuovi dalla lista nera", + "gui.createrailwaysnavigator.train_blacklist.title": "Lista nera dei treni", + "gui.createrailwaysnavigator.train_blacklist.add.tooltip": "Aggiungi a lista nera", + "gui.createrailwaysnavigator.train_blacklist.delete.tooltip": "Rimuovi dalla lista nera", + "gui.createrailwaysnavigator.search_settings.title": "Impostazioni di ricerca", + "gui.createrailwaysnavigator.search_settings.transfer_time": "Tempo minimo trasferimento", + "gui.createrailwaysnavigator.search_settings.transfer_time.description": "Il tempo minimo che dovrebbe essere disponibile per cambiare treno. (1o ~ 50 secondi di vita reale)", + "gui.createrailwaysnavigator.search_settings.train_groups": "Filtro categorie treno", + "gui.createrailwaysnavigator.search_settings.train_groups.description": "Decidi quali treni di quali categorie di treni si desidera usare.", + "gui.createrailwaysnavigator.search_settings.train_groups.overview": "%s categorie selezionate", + "gui.createrailwaysnavigator.search_settings.train_groups.overview.all": "Tutti", + "gui.createrailwaysnavigator.search_settings.train_groups.overview.none": "No", + "gui.createrailwaysnavigator.search_settings.train_groups.tooltip.reset": "Reimposta filtro", + "gui.createrailwaysnavigator.new_text_entry.add.tooltip": "Aggiungi", + "gui.createrailwaysnavigator.time": "Tempo: %s", + "gui.createrailwaysnavigator.time.now": "ora", + "gui.createrailwaysnavigator.time_format.dhm": "%s giorni %s ore %s min", + "gui.createrailwaysnavigator.time_format.hm": "%s ore %s min", + "gui.createrailwaysnavigator.time_format.m": "%s min", + "gui.createrailwaysnavigator.platform": "Binario", + "gui.createrailwaysnavigator.departure": "Partenza", + "gui.createrailwaysnavigator.destination": "Destinazione", + "gui.createrailwaysnavigator.line": "Linea", + "gui.createrailwaysnavigator.following_trains": "Seguono i treni:", + "gui.createrailwaysnavigator.via": "via", + "gui.createrailwaysnavigator.advanced_display_settings.title": "Impostazioni visualizzazione avanzata", + "gui.createrailwaysnavigator.advanced_display_settings.display_type": "Tipo visualizzazione", + "gui.createrailwaysnavigator.advanced_display_settings.display_type.description": "Determina le informazioni visualizzate.", + "gui.createrailwaysnavigator.advanced_display_settings.info_type": "Tipo informazioni", + "gui.createrailwaysnavigator.advanced_display_settings.info_type.description": "Determina come sono dettagliate le informazioni.", + "gui.createrailwaysnavigator.advanced_display_settings.double_sided": "Due parti", + "enum.createrailwaysnavigator.display_info_type": "Tipo visore informazioni", + "enum.createrailwaysnavigator.display_info_type.description": "Determina quante informazioni devono essere visualizzate nello schermo.", + "enum.createrailwaysnavigator.display_info_type.simple": "Semplice", + "enum.createrailwaysnavigator.display_info_type.info.simple": "Lo schermo mostrerà solo le informazioni più importanti senza ulteriori dettagli.", + "enum.createrailwaysnavigator.display_info_type.detailed": "Dettagliate", + "enum.createrailwaysnavigator.display_info_type.info.detailed": "Saranno mostrate le informazioni più importanti con alcuni dettagli, come velocità del treno, tappe, ecc.", + "enum.createrailwaysnavigator.display_info_type.informative": "Informativa", + "enum.createrailwaysnavigator.display_info_type.info.informative": "Mostra tutte le informazioni che potrebbero essere interessanti e le visualizza in una composizione fantasia. Sconsigliato per piccoli schermi in quanto il testo potrebbe diventare molto piccolo.", + "enum.createrailwaysnavigator.display_type": "Tipo schermo", + "enum.createrailwaysnavigator.display_type.description": "Il tipo di schermo che dipende dal suo scopo.", + "enum.createrailwaysnavigator.display_type.train_destination": "Destinazione treno", + "enum.createrailwaysnavigator.display_type.info.train_destination": "Inteso per essere usato al di fuori dei treni in quanto mostra informazioni sul treno stesso come nome, destinazione e (se selezionati) tappe e altre informazioni.", + "enum.createrailwaysnavigator.display_type.passenger_information": "Informazioni passeggero", + "enum.createrailwaysnavigator.display_type.info.passenger_information": "Rappresenta i visori trovati all'interno dei treni. Questi visori mostreranno prossima fermata, direzione di uscita e (se selezionati) la velocità del treno e una panoramica dell'itinerario.", + "enum.createrailwaysnavigator.display_type.platform": "Visore a piattaforma", + "enum.createrailwaysnavigator.display_type.info.platform": "Questi visori dovrebbero essere usati sui binari della stazione ferroviaria e mostra i prossimi treni in arrivo con dettagli aggiuntivi se selezionati. Non può essere usato nei treni!", + "enum.createrailwaysnavigator.side": "Lato", + "enum.createrailwaysnavigator.side.description": "Il lato del blocco su cui le informazioni devono essere visualizzate.", + "enum.createrailwaysnavigator.side.front": "Lato anteriore", + "enum.createrailwaysnavigator.side.info.front": "Le informazioni saranno visibili solo sul lato anteriore. Questo è il comportamento predefinito.", + "enum.createrailwaysnavigator.side.both": "Entrambi i lati", + "enum.createrailwaysnavigator.side.info.both": "Le informazioni saranno visibili su entrambi i lati.", + "enum.createrailwaysnavigator.time_display": "Visore tempo", + "enum.createrailwaysnavigator.time_display.description": "Determina come il tempo deve essere visualizzato.", + "enum.createrailwaysnavigator.time_display.abs": "ASS", + "enum.createrailwaysnavigator.time_display.info.abs": "ASS (assoluto)", + "enum.createrailwaysnavigator.time_display.eta": "TAS", + "enum.createrailwaysnavigator.time_display.info.eta": "TAS (Tempo di Arrivo Stimato)", + "create.display_source.advanced_display": "Visualizzazioni avanzate", + "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width": "Larghezza colonna Nome treno", + "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description": "in pixel a blocchi. (predefinito: 16)", + "gui.createrailwaysnavigator.display_source.advanced_display.platform_width": "Larghezza colonna Binario", + "gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description": "in pixel a blocchi. (predefinito: Auto)", + "gui.createrailwaysnavigator.section_settings.title": "Impostazioni sezione", + "gui.createrailwaysnavigator.section_settings.train_groups": "Assegna gruppo treni", + "gui.createrailwaysnavigator.section_settings.train_lines": "Assegna linea treni", + "gui.createrailwaysnavigator.section_settings.include_previous_station": "Includi inizio prossima sezione", + "gui.createrailwaysnavigator.section_settings.usable": "Percorribile", + "gui.createrailwaysnavigator.section_settings.none": "(Nessuna)", + "createrailwaysnavigator.schedule.condition.dynamic_delay": "Ritardo dinamico", + "createrailwaysnavigator.schedule.condition.dynamic_delay.min_duration": "Durata minima", + "createrailwaysnavigator.schedule.condition.dynamic_delay.title": "Attesa: %s..%s", + "createrailwaysnavigator.schedule.condition.dynamic_delay.at_least": "o almeno %s", + "createrailwaysnavigator.schedule.instruction.travel_section": "Sezione Nuovi viaggi", + "createrailwaysnavigator.schedule.instruction.travel_section.description": "Inizio di una nuova sezione di pianificazione.", + "createrailwaysnavigator.schedule.instruction.travel_section.configure": "Configura…", + "createrailwaysnavigator.schedule.instruction.travel_section.train_group": " - Imposta gruppo treni: ", + "createrailwaysnavigator.schedule.instruction.travel_section.train_line": " - Imposta linea treni: ", + "createrailwaysnavigator.schedule.instruction.travel_section.include_previous_station": " - Includi inizio sezione seguente: ", + "createrailwaysnavigator.schedule.instruction.travel_section.usable": " - Usabile: ", + "createrailwaysnavigator.schedule.instruction.reset_timings": "Reimposta tempi", + "display.createrailwaysnavigator.train_destination.simple": "Compatto", + "display.createrailwaysnavigator.train_destination.extended": "Esteso", + "display.createrailwaysnavigator.train_destination.detailed": "Dettagliato", + "display.createrailwaysnavigator.passenger_information.running_text": "Testo scorrevole", + "display.createrailwaysnavigator.passenger_information.detailed_with_schedule": "Dettagliato con pianificazione", + "display.createrailwaysnavigator.platform.running_text": "Testo scorrevole", + "display.createrailwaysnavigator.platform.table": "Tabella", + "display.createrailwaysnavigator.platform.focus": "Focalizza", + "gui.createrailwaysnavigator.saved_routes.title": "Itinerari salvati", + "gui.createrailwaysnavigator.schedule_board.title": "Tavola pianificazioni", + "gui.createrailwaysnavigator.station_tags.title": "Etichette stazione", + "gui.createrailwaysnavigator.journey_info.title": "Informazioni viaggio", + "gui.createrailwaysnavigator.journey_info.date": "Giorno %s", + "gui.createrailwaysnavigator.journey_info.train": "Da %s (%s) a %s", + "gui.createrailwaysnavigator.color_picker.custom": "Personalizza...", + "gui.createrailwaysnavigator.color_picker.no_color": "Nessun colore", + "gui.createrailwaysnavigator.schedule_board.view_details": "Vedi dettagli", + "gui.createrailwaysnavigator.schedule_board.train_from": "da %s", + "gui.createrailwaysnavigator.search_options.departure_in": "Partenza tra", + "gui.createrailwaysnavigator.search_options.train_groups": "Gruppi di treni", + "gui.createrailwaysnavigator.search_options.transfer_time": "Tempo di trasferimento", + "gui.createrailwaysnavigator.search_options.advanced_options": "Opzioni avanzate", + "gui.createrailwaysnavigator.search_options.train_groups.all": "Tutti", + "gui.createrailwaysnavigator.search_options.train_groups.excluded": "%s esclusi", + "gui.createrailwaysnavigator.search_options.saved_routes.all": "Tutti", + "gui.createrailwaysnavigator.search_options.saved_routes.excluded": "%s esclusi", + "gui.createrailwaysnavigator.empty_list": "La lista è vuota", + "gui.createrailwaysnavigator.new_entry.add": "Aggiungi nuovo", + "gui.createrailwaysnavigator.new_entry.new": "Nuovo:", + "gui.createrailwaysnavigator.saved_routes.saved": "%s salvati", + "gui.createrailwaysnavigator.route_overview.notification.schedule_changed.title": "Pianificazione cambiata!", + "gui.createrailwaysnavigator.route_overview.notification.schedule_changed": "La pianificazione del percorso salvato è cambiata. Controlla il navigatore per queste modifiche.", + "gui.createrailwaysnavigator.route_overview.transfers": "Trasferimenti %s", + "gui.createrailwaysnavigator.route_overview.cancelled": "Cancellato", + "gui.createrailwaysnavigator.saved_routes.saved_route": "Itinerario salvato", + "block.createrailwaysnavigator.advanced_display.ber.arrival": "Arrivo", + "block.createrailwaysnavigator.advanced_display.ber.cancelled": "Cancellato", + "block.createrailwaysnavigator.advanced_display.ber.delayed": "Ritardo circa %s minuti", + "block.createrailwaysnavigator.advanced_display.ber.information_about_cancelled": "Informazioni su %s: Questo treno è stato cancellato", + "block.createrailwaysnavigator.advanced_display.ber.information_about_delayed": "Informazioni su %s: Ritardo circa %s minuti", + "block.createrailwaysnavigator.advanced_display.ber.cancelled2": ", è oggi cancellato. Ci scusiamo per l'inconveniente.", + "block.createrailwaysnavigator.advanced_display.ber.delayed2": ", oggi circa %s minuti in ritardo.", + "block.createrailwaysnavigator.advanced_display.ber.reason": "Ragione: ", + "gui.createrailwaysnavigator.route_widget.show_details": "Mostra dettagli", + "gui.createrailwaysnavigator.route_widget.save": "Salva", + "gui.createrailwaysnavigator.route_widget.remove": "Rimuovi", + "gui.createrailwaysnavigator.route_widget.share": "Condividi…", + "gui.createrailwaysnavigator.saved_routes.in_the_past": "In passato", + "gui.createrailwaysnavigator.saved_routes.today": "Oggi", + "gui.createrailwaysnavigator.saved_routes.tomorrow": "Domani", + "gui.createrailwaysnavigator.saved_routes.in_days": "Fra %s giorni", + "gui.createrailwaysnavigator.saved_route_widget.show_details": "Mostra dettagli", + "gui.createrailwaysnavigator.saved_route_widget.share": "Condividi…", + "gui.createrailwaysnavigator.saved_route_widget.notifications": "Mostra notifiche", + "gui.createrailwaysnavigator.train_status.unknown_delay": "Ritardo nelle operazioni", + "gui.createrailwaysnavigator.train_status.delay_previous_journey": "Ritardo nel viaggio precedente", + "gui.createrailwaysnavigator.train_status.red_signal": "Segnale rosso", + "gui.createrailwaysnavigator.train_status.priority_other_train": "Priorità di un altro treno", + "gui.createrailwaysnavigator.train_status.delay_other_train": "Ritardo di un altro treno", + "gui.createrailwaysnavigator.train_status.track_closed": "Tracciato chiuso", + "gui.createrailwaysnavigator.train_status.staff_shortage": "Carenza di personale", + "gui.createrailwaysnavigator.train_status.operational_disruption": "Interruzione operativa", + "gui.createrailwaysnavigator.train_status.special_trip": "Viaggio speciale", + "gui.createrailwaysnavigator.route_details.save_route.tooltip": "Salva percorso", + "gui.createrailwaysnavigator.route_details.remove_route.tooltip": "Rimuovi percorso", + "gui.createrailwaysnavigator.route_details.show_popup.tooltip": "Mostra suggerimenti", + "gui.createrailwaysnavigator.navigator.my_profile": "Il mio profilo", + "gui.createrailwaysnavigator.navigator.train_initialization_warning": "Alcuni percorsi potrebbero essere incompleti o non suggeriti perché Create Railways Navigator non ha ancora inizializzato tutti i treni.", + "gui.createrailwaysnavigator.global_settings.train_line.title": "Linee treni", + "gui.createrailwaysnavigator.global_settings.train_line.color": "Seleziona colore", + "gui.createrailwaysnavigator.global_settings.train_line.description": "Crea linee ferroviarie per raggruppare diversi treni insieme, sovrascrivere il loro nome visualizzato e regola altre impostazioni per ogni linea. (Può essere assegnato solo ai treni nella pianificazione)" +} diff --git a/common/src/main/resources/assets/createrailwaysnavigator/lang/ja_jp.json b/common/src/main/resources/assets/createrailwaysnavigator/lang/ja_jp.json new file mode 100644 index 00000000..8008ec6f --- /dev/null +++ b/common/src/main/resources/assets/createrailwaysnavigator/lang/ja_jp.json @@ -0,0 +1,315 @@ +{ + "advancement.createrailwaysnavigator.navigator": "ご乗車ありがとうございました。", + "advancement.createrailwaysnavigator.navigator.description": "ある駅から別の駅への列車を検索するナビゲーターを作る。", + "advancement.createrailwaysnavigator.advanced_display": "4kには及ばない", + "advancement.createrailwaysnavigator.advanced_display.description": "ディスプレイボードを強化して、より多くの情報を表示できるようにするほか、からくり化した列車内にも設置できます。", + "item.createrailwaysnavigator.navigator": "ナビゲーター", + "item.createrailwaysnavigator.navigator.tooltip.summary": "ナビゲーターは乗車可能な列車を示し、停車駅・リアルタイムデータなどの追加情報を提供します。", + "block.createrailwaysnavigator.train_station_clock": "駅の時計", + "block.createrailwaysnavigator.advanced_display_block": "高度なブロック型ディスプレイ", + "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "からくり化した列車に取りつけると行き先や旅客案内を表示したり、駅のホームで通常のディスプレイボードより多くの情報を表示できるディスプレイボードとして使えます", + "block.createrailwaysnavigator.advanced_display_block.tooltip.condition1": "レンチで右クリックしたとき", + "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "ディスプレイの設定メニューを開きます。", + "block.createrailwaysnavigator.advanced_display": "高度なボード型ディスプレイ", + "block.createrailwaysnavigator.advanced_display.tooltip.summary": "からくり化した列車に取りつけると行き先や旅客案内を表示したり、駅のホームで通常のディスプレイボードより多くの情報を表示できるディスプレイボードとして使えます", + "block.createrailwaysnavigator.advanced_display.tooltip.condition1": "レンチで右クリックしたとき", + "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "ディスプレイの設定メニューを開きます。", + "block.createrailwaysnavigator.advanced_display_small": "高度な小型ディスプレイ", + "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "からくり化した列車に取りつけると行き先や旅客案内を表示したり、駅のホームで通常のディスプレイボードより多くの情報を表示できるディスプレイボードとして使えます", + "block.createrailwaysnavigator.advanced_display_small.tooltip.condition1": "レンチで右クリックしたとき", + "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "ディスプレイの設定メニューを開きます。", + "block.createrailwaysnavigator.advanced_display_panel": "高度なパネル型ディスプレイ", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "からくり化した列車に取りつけると行き先や旅客案内を表示したり、駅のホームで通常のディスプレイボードより多くの情報を表示できるディスプレイボードとして使えます", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.condition1": "レンチで右クリックしたとき", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "ディスプレイの設定メニューを開きます。", + "block.createrailwaysnavigator.advanced_display_half_panel": "高度なハーフパネル型ディスプレイ", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "からくり化した列車に取りつけると行き先や旅客案内を表示したり、駅のホームで通常のディスプレイボードより多くの情報を表示できるディスプレイボードとして使えます", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.condition1": "レンチで右クリックしたとき", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "ディスプレイの設定メニューを開きます。", + "block.createrailwaysnavigator.advanced_display_sloped": "高度な傾斜型ディスプレイ", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "からくり化した列車に取りつけると行き先や旅客案内を表示したり、駅のホームで通常のディスプレイボードより多くの情報を表示できるディスプレイボードとして使えます", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.condition1": "レンチで右クリックしたとき", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "ディスプレイの設定メニューを開きます。", + "block.createrailwaysnavigator.advanced_display_slab": "高度なハーフブロック型ディスプレイ", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.summary": "からくり化した列車に取りつけると行き先や旅客案内を表示したり、駅のホームで通常のディスプレイボードより多くの情報を表示できるディスプレイボードとして使えます", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.condition1": "レンチで右クリックしたとき", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.behaviour1": "ディスプレイの設定メニューを開きます。", + "block.createrailwaysnavigator.advanced_display.ber.not_in_service": "回送", + "category.createrailwaysnavigator.crn": "Create Railways Navigator", + "key.createrailwaysnavigator.route_overlay_options": "ルートオーバーレイの設定を表示", + "enum.createrailwaysnavigator.overlay_position": "表示位置", + "enum.createrailwaysnavigator.overlay_position.info.top_left": "左上", + "enum.createrailwaysnavigator.overlay_position.info.top_right": "右上", + "enum.createrailwaysnavigator.overlay_position.info.bottom_left": "左下", + "enum.createrailwaysnavigator.overlay_position.info.bottom_right": "右下", + "gui.createrailwaysnavigator.loading.title": "データをダウンロードしています", + "gui.createrailwaysnavigator.overlay_settings.title": "ルートオーバーレイ設定", + "gui.createrailwaysnavigator.route_overlay_settings.show_details": "詳細を表示", + "gui.createrailwaysnavigator.route_overlay_settings.unpin": "ルートオーバーレイを削除", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.on": "ナレーターアナウンス有効", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.off": "ナレーターアナウンス無効", + "gui.createrailwaysnavigator.route_overlay_settings.notifications.on": "通知有効", + "gui.createrailwaysnavigator.route_overlay_settings.notifications.off": "通知無効", + "gui.createrailwaysnavigator.route_overlay_settings.scale": "GUI スケール", + "gui.createrailwaysnavigator.route_overlay_settings.narrator": "ナレーターのアナウンス", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.description": "ナレーターは、次の停車駅や変更などをアナウンスします。", + "gui.createrailwaysnavigator.route_overlay_settings.notifications": "通知", + "gui.createrailwaysnavigator.route_overlay_settings.notifications.description": "トーストは、次の停車駅や変更などをアナウンスします。", + "gui.createrailwaysnavigator.common.expand": "詳細を表示", + "gui.createrailwaysnavigator.common.collapse": "詳細を非表示", + "gui.createrailwaysnavigator.common.go_back": "戻る", + "gui.createrailwaysnavigator.common.go_to_top": "一番上へ戻る", + "gui.createrailwaysnavigator.common.reset_defaults": "デフォルトに戻す", + "gui.createrailwaysnavigator.common.count": "カウント", + "gui.createrailwaysnavigator.common.true": "はい", + "gui.createrailwaysnavigator.common.false": "いいえ", + "gui.createrailwaysnavigator.common.search": "検索", + "gui.createrailwaysnavigator.common.auto": "オート", + "gui.createrailwaysnavigator.common.server_error": "タスク実行中にサーバーエラーが発生しました。詳細はコンソールを確認してください。", + "gui.createrailwaysnavigator.common.delete": "削除", + "gui.createrailwaysnavigator.common.add": "追加", + "gui.createrailwaysnavigator.common.help": "ヘルプ", + "gui.createrailwaysnavigator.navigator.title": "Create Railways Navigator", + "gui.createrailwaysnavigator.navigator.no_connections": "接続が見つかりません。", + "gui.createrailwaysnavigator.navigator.not_searched": "まだ検索されていません。", + "gui.createrailwaysnavigator.navigator.searching": "接続を検索中...", + "gui.createrailwaysnavigator.navigator.error_title": "ナビゲートできません!", + "gui.createrailwaysnavigator.navigator.start_end_null": "出発地または目的地が空です。", + "gui.createrailwaysnavigator.navigator.start_end_equal": "出発地と目的地が同じです。", + "gui.createrailwaysnavigator.navigator.route_entry.connection_in_past": "❌ 接続を逃しました", + "gui.createrailwaysnavigator.navigator.route_entry.transfer": "乗換。", + "gui.createrailwaysnavigator.navigator.route_entry.station_start": "%s から", + "gui.createrailwaysnavigator.navigator.global_settings.tooltip": "グローバル設定", + "gui.createrailwaysnavigator.navigator.search_settings.tooltip": "検索設定", + "gui.createrailwaysnavigator.navigator.search.tooltip": "検索", + "gui.createrailwaysnavigator.navigator.location.tooltip": "最寄り駅", + "gui.createrailwaysnavigator.navigator.refresh.tooltip": "リフレッシュ", + "gui.createrailwaysnavigator.navigator.switch.tooltip": "上下を切り替える", + "gui.createrailwaysnavigator.route_details.title": "ルート詳細", + "gui.createrailwaysnavigator.route_details.departure": "出発まで", + "gui.createrailwaysnavigator.route_details.next_transfer_time": "乗り換えまで", + "gui.createrailwaysnavigator.route_details.transfer": "乗り換え", + "gui.createrailwaysnavigator.route_overview.title": "ルート詳細", + "gui.createrailwaysnavigator.route_overview.journey_begins": "あなたの旅が始まります %s から %s まで、出発 %s", + "gui.createrailwaysnavigator.route_overview.journey_begins_with_platform": "あなたの旅が始まります %s から %s まで、出発 %s、 %s 番線", + "gui.createrailwaysnavigator.route_overview.train_details": "%s から %s まで", + "gui.createrailwaysnavigator.route_overview.next_stop": "次は %s です", + "gui.createrailwaysnavigator.route_overview.transfer": "%s から %s にお乗り換えです", + "gui.createrailwaysnavigator.route_overview.transfer_with_platform": "%s から%s へ %s 番線でお乗り換えです", + "gui.createrailwaysnavigator.route_overview.journey_completed": "旅が完了しました", + "gui.createrailwaysnavigator.route_overview.after_journey": "ご乗車ありがとうございました。 %s に到着です", + "gui.createrailwaysnavigator.route_overview.next_connections": "次の接続", + "gui.createrailwaysnavigator.route_overview.schedule_transfer": "乗り換え", + "gui.createrailwaysnavigator.route_overview.train_cancelled": "この列車は運休になりました", + "gui.createrailwaysnavigator.route_overview.train_cancellation_info": "%s に関する情報", + "gui.createrailwaysnavigator.route_overview.stop_cancelled": "❌運休", + "gui.createrailwaysnavigator.route_overview.connection_endangered": "接続が危険", + "gui.createrailwaysnavigator.route_overview.connection_missed": "接続を逃しました", + "gui.createrailwaysnavigator.route_overview.connection_cancelled": "この列車は運休になりました", + "gui.createrailwaysnavigator.route_overview.journey_interrupted": "%s への旅を続けることができません。", + "gui.createrailwaysnavigator.route_overview.connection_missed_info": "列車の遅延により、接続列車を逃しました。ナビゲーターで代替の手段を探してください。ご不便をおかけして申し訳ありません。", + "gui.createrailwaysnavigator.route_overview.train_cancelled_info": "%s についての情報: 本日この列車は運休になりました。誠に申し訳ございません。他の選択をナビゲーターで探してください。", + "gui.createrailwaysnavigator.route_overview.train_cancelled_title": "本日この列車は運休になりました", + "gui.createrailwaysnavigator.route_overview.journey_interrupted_info": "%s への旅を続けることができません。ナビゲーターで代替の手段を探してください。", + "gui.createrailwaysnavigator.route_overview.options": "%s を押してオプションを表示します", + "gui.createrailwaysnavigator.route_overview.notification.journey_begins.title": "%s への旅が始まります!", + "gui.createrailwaysnavigator.route_overview.notification.journey_begins": "%s から %s まで、出発 %s", + "gui.createrailwaysnavigator.route_overview.notification.journey_begins_with_platform": "%s から %s まで、出発 %s、%s 番線から", + "gui.createrailwaysnavigator.route_overview.notification.platform_changed.title": "あなたのプラットフォームが変更されました! ", + "gui.createrailwaysnavigator.route_overview.notification.platform_changed": "%s のあなたの列車は、本日 %s 番線から出発します。", + "gui.createrailwaysnavigator.route_overview.notification.train_delayed.title": "%s: 到着 %s が遅れています。", + "gui.createrailwaysnavigator.route_overview.notification.train_delayed": "%s が %s の代わりに %s", + "gui.createrailwaysnavigator.route_overview.notification.train_cancelled.title": "%s: この列車は運休になりました", + "gui.createrailwaysnavigator.route_overview.notification.train_cancelled": "本日 %s から %s は運休になりました。", + "gui.createrailwaysnavigator.route_overview.notification.transfer.title": "乗り換えが近づいています", + "gui.createrailwaysnavigator.route_overview.notification.transfer": "%s から %s へ、%s 番線で乗り換え", + "gui.createrailwaysnavigator.route_overview.notification.transfer_with_platform": "%s から %s へ、 %s 番線で乗り換え", + "gui.createrailwaysnavigator.route_overview.notification.connection_endangered.title": "%s から %s へ、%s 番線で乗り換え", + "gui.createrailwaysnavigator.route_overview.notification.connection_endangered": "おそらく %s から %s まで到達することができないでしょう。", + "gui.createrailwaysnavigator.route_overview.notification.connection_missed.title": "接続を逃しました", + "gui.createrailwaysnavigator.route_overview.notification.connection_missed": "接続列車 %s から %s を逃しました。", + "gui.createrailwaysnavigator.route_overview.notification.journey_completed.title": "目的地に到着しました!", + "gui.createrailwaysnavigator.route_overview.notification.journey_completed": "ご乗車ありがとうございました。", + "gui.createrailwaysnavigator.route_overview.date": "日 %s、%s ", + "gui.createrailwaysnavigator.global_settings.title": "グローバル設定", + "gui.createrailwaysnavigator.global_settings.option.tooltip": "クリックで編集", + "gui.createrailwaysnavigator.global_settings.option_alias.title": "駅タグ", + "gui.createrailwaysnavigator.global_settings.option_alias.description": "駅タグを定義して、複数のプラットフォームを持つ駅(例:MyStation 1、MyStation 2、...)を、カスタム名で単一の駅(例:MyStation)として扱うようにします。", + "gui.createrailwaysnavigator.global_settings.option_blacklist.title": "駅ブラックリスト", + "gui.createrailwaysnavigator.global_settings.option_blacklist.description": "ナビゲーション結果に表示されるべきでない駅を除外します。これらの駅はルート生成時に無視されます。", + "gui.createrailwaysnavigator.global_settings.train_group.title": "列車グループ", + "gui.createrailwaysnavigator.global_settings.train_group.description": "列車グループを作成して、すべての列車を整理しましょう(例:地域サービス、長距離サービスなど)。ユーザーは、どのグループを使うかを決めることができます。", + "gui.createrailwaysnavigator.global_settings.train_blacklist.title": "列車ブラックリスト", + "gui.createrailwaysnavigator.global_settings.train_blacklist.description": "ルート検索の結果から、貨物列車や臨時列車などの特定の列車を除外してください。", + "gui.createrailwaysnavigator.station_tags.summary": "%s 駅は含まれています", + "gui.createrailwaysnavigator.station_tags.editor": "最後に %s が %s に編集しました", + "gui.createrailwaysnavigator.station_tags.add.tooltip": "新しいエントリを作成する", + "gui.createrailwaysnavigator.station_tags.delete_alias.tooltip": "タグを削除", + "gui.createrailwaysnavigator.station_tags.delete_station.tooltip": "駅を削除", + "gui.createrailwaysnavigator.station_tags.modify_platform.tooltip": "クリックで変えます", + "gui.createrailwaysnavigator.station_tags.add_station.tooltip": "駅を追加", + "gui.createrailwaysnavigator.station_tags.hint.station_name": "駅名", + "gui.createrailwaysnavigator.station_tags.hint.platform": "プラットフォームのラベル", + "gui.createrailwaysnavigator.station_tags.enter_name": "名前をここに入力してください", + "gui.createrailwaysnavigator.train_group_settings.title": "列車グループ設定", + "gui.createrailwaysnavigator.train_group_settings.summary": "%s 編成の列車が含まれています", + "gui.createrailwaysnavigator.train_group_settings.editor": "最終編集者: %s、編集日時: %s", + "gui.createrailwaysnavigator.train_group_settings.delete_alias.tooltip": "グループを削除", + "gui.createrailwaysnavigator.train_group_settings.delete_station.tooltip": "列車を削除", + "gui.createrailwaysnavigator.train_group_settings.add_station.tooltip": "列車を追加", + "gui.createrailwaysnavigator.blacklist.title": "鉄道駅ブラックリスト", + "gui.createrailwaysnavigator.blacklist.add.tooltip": "ブラックリストに追加", + "gui.createrailwaysnavigator.blacklist.delete.tooltip": "ブラックリストから削除", + "gui.createrailwaysnavigator.train_blacklist.title": "列車ブラックリスト", + "gui.createrailwaysnavigator.train_blacklist.add.tooltip": "ブラックリストに追加", + "gui.createrailwaysnavigator.train_blacklist.delete.tooltip": "ブラックリストから削除", + "gui.createrailwaysnavigator.search_settings.title": "検索設定", + "gui.createrailwaysnavigator.search_settings.transfer_time": "最小乗り換え時間", + "gui.createrailwaysnavigator.search_settings.transfer_time.description": "列車を乗り換えるために確保すべき最小の時間(1時間 ~ 実際の50秒)", + "gui.createrailwaysnavigator.search_settings.train_groups": "列車カテゴリフィルター", + "gui.createrailwaysnavigator.search_settings.train_groups.description": "どの列車カテゴリからどの列車を使用するかを決定してください。", + "gui.createrailwaysnavigator.search_settings.train_groups.overview": "%s カテゴリが選択されました", + "gui.createrailwaysnavigator.search_settings.train_groups.overview.all": "すべて", + "gui.createrailwaysnavigator.search_settings.train_groups.overview.none": "いいえ", + "gui.createrailwaysnavigator.search_settings.train_groups.tooltip.reset": "リセットフィルター", + "gui.createrailwaysnavigator.new_text_entry.add.tooltip": "追加", + "gui.createrailwaysnavigator.time": "時間: %s", + "gui.createrailwaysnavigator.time.now": "今", + "gui.createrailwaysnavigator.time_format.dhm": "%s 日 %s 時間 %s 分", + "gui.createrailwaysnavigator.time_format.hm": "%s 時間 %s 分", + "gui.createrailwaysnavigator.time_format.m": "%s 分", + "gui.createrailwaysnavigator.platform": "ホーム", + "gui.createrailwaysnavigator.departure": "出発", + "gui.createrailwaysnavigator.destination": "目的地", + "gui.createrailwaysnavigator.line": "線 ", + "gui.createrailwaysnavigator.following_trains": "次の電車は: ", + "gui.createrailwaysnavigator.via": "経由", + "gui.createrailwaysnavigator.advanced_display_settings.title": "発展型ディスプレイの設定", + "gui.createrailwaysnavigator.advanced_display_settings.display_type": "ディスプレイタイプ", + "gui.createrailwaysnavigator.advanced_display_settings.display_type.description": "表示される情報を決定します。", + "gui.createrailwaysnavigator.advanced_display_settings.info_type": "情報の種類", + "gui.createrailwaysnavigator.advanced_display_settings.info_type.description": "情報がどれほど詳細であるかを決定します。", + "gui.createrailwaysnavigator.advanced_display_settings.double_sided": "両面", + "enum.createrailwaysnavigator.display_info_type": "表示情報の種類", + "enum.createrailwaysnavigator.display_info_type.description": "表示ボードにどれだけの情報を表示するかを決定します。", + "enum.createrailwaysnavigator.display_info_type.simple": "シンプル", + "enum.createrailwaysnavigator.display_info_type.info.simple": "ディスプレイには、追加の詳細なしで最も重要な情報のみが表示されます", + "enum.createrailwaysnavigator.display_info_type.detailed": "詳細", + "enum.createrailwaysnavigator.display_info_type.info.detailed": "最も重要な情報に加えて、列車の速度や停車駅などの詳細が表示されます", + "enum.createrailwaysnavigator.display_info_type.informative": "より詳細", + "enum.createrailwaysnavigator.display_info_type.info.informative": "興味深い可能性のあるすべての情報を表示し、おしゃれなレイアウトで表示します。テキストが非常に小さくなる可能性があるため、小さなディスプレイにはおすすめしません。", + "enum.createrailwaysnavigator.display_type": "表示タイプ", + "enum.createrailwaysnavigator.display_type.description": "表示の目的に応じた表示タイプ", + "enum.createrailwaysnavigator.display_type.train_destination": "列車の目的地", + "enum.createrailwaysnavigator.display_type.info.train_destination": "列車そのものに関する情報、例えば列車の名前、目的地、(選択された場合は)停車駅やその他の情報などを表示するため、列車の外側で使用することを意図しています。", + "enum.createrailwaysnavigator.display_type.passenger_information": "旅客案内", + "enum.createrailwaysnavigator.display_type.info.passenger_information": "列車内に見られる表示を表します。これらの表示には、次の停車駅、出口の方向、(選択された場合は)列車の速度やルート概要が表示されます。", + "enum.createrailwaysnavigator.display_type.platform": "ホームのディスプレイ(発車標)", + "enum.createrailwaysnavigator.display_type.info.platform": "この表示は駅のホームで使用するべきもので、次に到着する列車を表示し、選択された場合は追加の詳細も表示されます。列車内では使用できません", + "enum.createrailwaysnavigator.side": "片方 ", + "enum.createrailwaysnavigator.side.description": "情報が表示されるブロックの側面", + "enum.createrailwaysnavigator.side.front": "正面", + "enum.createrailwaysnavigator.side.info.front": "情報は前面にのみ表示されます。これがデフォルトの動作です。", + "enum.createrailwaysnavigator.side.both": "両面", + "enum.createrailwaysnavigator.side.info.both": "情報は両面に表示されます。", + "enum.createrailwaysnavigator.time_display": "時刻表示", + "enum.createrailwaysnavigator.time_display.description": "時刻がどのように表示されるべきかを決定します。", + "enum.createrailwaysnavigator.time_display.abs": "ABS (絶対時刻)", + "enum.createrailwaysnavigator.time_display.info.abs": "ABS(絶対時刻)", + "enum.createrailwaysnavigator.time_display.eta": "ETA (到着予定時刻)", + "enum.createrailwaysnavigator.time_display.info.eta": "ETA(到着予定時刻)", + "create.display_source.advanced_display": "高度なディスプレイ", + "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width": "列車名の列幅", + "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description": "ブロックピクセル単位。(デフォルト: 16)", + "gui.createrailwaysnavigator.display_source.advanced_display.platform_width": "ホームの列幅", + "gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description": "ブロックピクセル単位。(デフォルト: 自動)", + "gui.createrailwaysnavigator.section_settings.title": "セクション設定", + "gui.createrailwaysnavigator.section_settings.train_groups": "列車グループを割り当てる", + "gui.createrailwaysnavigator.section_settings.train_lines": "路線を割り当てる", + "gui.createrailwaysnavigator.section_settings.include_previous_station": "次のセクションの初めを含む", + "gui.createrailwaysnavigator.section_settings.usable": "移動可能", + "gui.createrailwaysnavigator.section_settings.none": "(なし)", + "createrailwaysnavigator.schedule.condition.dynamic_delay": "動的遅延", + "createrailwaysnavigator.schedule.condition.dynamic_delay.min_duration": "最短所要時間", + "createrailwaysnavigator.schedule.condition.dynamic_delay.title": "待つ: %s..%s", + "createrailwaysnavigator.schedule.condition.dynamic_delay.at_least": "少なくとも %s", + "createrailwaysnavigator.schedule.instruction.travel_section": "新しい時刻表セクション", + "createrailwaysnavigator.schedule.instruction.travel_section.description": "新しい時刻表セクションの初め", + "createrailwaysnavigator.schedule.instruction.travel_section.configure": "コンフィグ...", + "createrailwaysnavigator.schedule.instruction.travel_section.train_group": " - 列車グル ープを設定する: ", + "createrailwaysnavigator.schedule.instruction.travel_section.train_line": " - 路線を設定する: ", + "createrailwaysnavigator.schedule.instruction.travel_section.include_previous_station": " - 次のセクションの初めを含む: ", + "createrailwaysnavigator.schedule.instruction.travel_section.usable": " - 移動可能: ", + "createrailwaysnavigator.schedule.instruction.reset_timings": "タイミングをリセット", + "display.createrailwaysnavigator.train_destination.simple": "コンパクト", + "display.createrailwaysnavigator.train_destination.extended": "延長", + "display.createrailwaysnavigator.train_destination.detailed": "詳細", + "display.createrailwaysnavigator.passenger_information.running_text": "スクロールテキスト", + "display.createrailwaysnavigator.passenger_information.detailed_with_schedule": "詳細な時刻表", + "display.createrailwaysnavigator.platform.running_text": "スクロールテキスト", + "display.createrailwaysnavigator.platform.table": "テーブル表示", + "display.createrailwaysnavigator.platform.focus": "フォーカス表示", + "gui.createrailwaysnavigator.saved_routes.title": "共有したルート", + "gui.createrailwaysnavigator.schedule_board.title": "時刻表", + "gui.createrailwaysnavigator.station_tags.title": "駅のタグ", + "gui.createrailwaysnavigator.journey_info.title": "旅の情報", + "gui.createrailwaysnavigator.journey_info.date": "%s日", + "gui.createrailwaysnavigator.journey_info.train": "%s (%s) から %s", + "gui.createrailwaysnavigator.color_picker.custom": "カスタム...", + "gui.createrailwaysnavigator.color_picker.no_color": "色なし", + "gui.createrailwaysnavigator.schedule_board.view_details": "詳細を表示", + "gui.createrailwaysnavigator.schedule_board.train_from": "%s から", + "gui.createrailwaysnavigator.search_options.departure_in": "出発は", + "gui.createrailwaysnavigator.search_options.train_groups": "列車グループ", + "gui.createrailwaysnavigator.search_options.transfer_time": "乗り換え時間", + "gui.createrailwaysnavigator.search_options.advanced_options": "詳細設定", + "gui.createrailwaysnavigator.search_options.train_groups.all": "全て", + "gui.createrailwaysnavigator.search_options.train_groups.excluded": "%s は除外されました", + "gui.createrailwaysnavigator.search_options.saved_routes.all": "全て", + "gui.createrailwaysnavigator.search_options.saved_routes.excluded": "%s は除外されました", + "gui.createrailwaysnavigator.empty_list": "このリストは空っぽです", + "gui.createrailwaysnavigator.new_entry.add": "エントリを追加する", + "gui.createrailwaysnavigator.new_entry.new": "新:", + "gui.createrailwaysnavigator.saved_routes.saved": "%s を保存", + "gui.createrailwaysnavigator.route_overview.notification.schedule_changed.title": "時刻表は変わりました", + "gui.createrailwaysnavigator.route_overview.notification.schedule_changed": "共有したルートの時刻表が変わりました。変更を確認したい方はナビゲーターをご覧ください。", + "gui.createrailwaysnavigator.route_overview.transfers": "%s 乗り換え", + "gui.createrailwaysnavigator.route_overview.cancelled": "運休", + "gui.createrailwaysnavigator.saved_routes.saved_route": "ルートを共有", + "block.createrailwaysnavigator.advanced_display.ber.arrival": "到着", + "block.createrailwaysnavigator.advanced_display.ber.cancelled": "運休", + "block.createrailwaysnavigator.advanced_display.ber.delayed": "遅延約%s分", + "block.createrailwaysnavigator.advanced_display.ber.information_about_cancelled": "%s に関する情報: この列車は運休になりました", + "block.createrailwaysnavigator.advanced_display.ber.information_about_delayed": "%sについての情報: 遅延約%s分", + "block.createrailwaysnavigator.advanced_display.ber.cancelled2": "は運休になりました。申し訳ありません。", + "block.createrailwaysnavigator.advanced_display.ber.delayed2": "、今日約%s分遅延", + "block.createrailwaysnavigator.advanced_display.ber.reason": "理由: ", + "gui.createrailwaysnavigator.route_widget.show_details": "詳細を表示", + "gui.createrailwaysnavigator.route_widget.save": "保存", + "gui.createrailwaysnavigator.route_widget.remove": "削除", + "gui.createrailwaysnavigator.route_widget.share": "共有", + "gui.createrailwaysnavigator.saved_routes.in_the_past": "過去に", + "gui.createrailwaysnavigator.saved_routes.today": "今日", + "gui.createrailwaysnavigator.saved_routes.tomorrow": "明日", + "gui.createrailwaysnavigator.saved_routes.in_days": "後%s日", + "gui.createrailwaysnavigator.saved_route_widget.show_details": "詳細を表示", + "gui.createrailwaysnavigator.saved_route_widget.share": "共有", + "gui.createrailwaysnavigator.saved_route_widget.notifications": "通知を表示", + "gui.createrailwaysnavigator.train_status.unknown_delay": "業務の遅延", + "gui.createrailwaysnavigator.train_status.delay_previous_journey": "前の旅の遅延", + "gui.createrailwaysnavigator.train_status.red_signal": "赤信号", + "gui.createrailwaysnavigator.train_status.priority_other_train": "別の列車は優先されました", + "gui.createrailwaysnavigator.train_status.delay_other_train": "別の列車は遅延があります", + "gui.createrailwaysnavigator.train_status.track_closed": "線路閉鎖", + "gui.createrailwaysnavigator.train_status.staff_shortage": "スタッフ不足", + "gui.createrailwaysnavigator.train_status.operational_disruption": "業務の中断", + "gui.createrailwaysnavigator.train_status.special_trip": "特別な旅", + "gui.createrailwaysnavigator.route_details.save_route.tooltip": "ルートを共有", + "gui.createrailwaysnavigator.route_details.remove_route.tooltip": "ルートを削除", + "gui.createrailwaysnavigator.route_details.show_popup.tooltip": "ポップアップを表示", + "gui.createrailwaysnavigator.navigator.my_profile": "プロフィール", + "gui.createrailwaysnavigator.navigator.train_initialization_warning": "Create Railways Navigator がまだすべての列車を初期化していないため、一部のルートが不完全であるか、まったく提案されない可能性があります。", + "gui.createrailwaysnavigator.global_settings.train_line.title": "鉄道路線", + "gui.createrailwaysnavigator.global_settings.train_line.color": "色の選択", + "gui.createrailwaysnavigator.global_settings.train_line.description": "路線を作成したら、異なる列車をまとめたり、表示名を上書きしたり、各路線の他のの設定を調整することができます。(時刻表内の列車のみ割り当て可能)" +} diff --git a/common/src/main/resources/assets/createrailwaysnavigator/lang/ko_kr.json b/common/src/main/resources/assets/createrailwaysnavigator/lang/ko_kr.json index 87d4f882..2d32f96b 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/lang/ko_kr.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/lang/ko_kr.json @@ -1,59 +1,49 @@ { "advancement.createrailwaysnavigator.navigator": "오늘도 열차를 이용해주셔서 고맙습니다", - "advancement.createrailwaysnavigator.navigator.description": "기차역 사이를 잇는 열차를 검색하기 위한 탐색기를 제작하세요.", + "advancement.createrailwaysnavigator.navigator.description": "기차역 사이를 잇는 열차를 검색하기 위한 탐색기를 제작하세요.", "advancement.createrailwaysnavigator.advanced_display": "4K 화질은 아니로군", "advancement.createrailwaysnavigator.advanced_display.description": "더 많은 정보를 표시하기 위해 전광판을 업그레이드하고 무려 기차 안에다가도 설치해보세요.", - - "itemGroup.createrailwaysnavigator.tab": "Create 철도 탐색기", - "item.createrailwaysnavigator.navigator": "Create 철도 탐색기", - "item.createrailwaysnavigator.navigator.tooltip.summary": "_탐색기_는 추가적인 _열차 경로_와 함께 _경유지_, _실시간 데이터_ 등 다양한 정보를 보여줍니다.", - + "item.createrailwaysnavigator.navigator.tooltip.summary": "_탐색기_는 추가적인 _열차 경로_와 함께 _경유지_, _실시간 데이터_ 등 다양한 정보를 보여줍니다.", "block.createrailwaysnavigator.train_station_clock": "승강장 시계", "block.createrailwaysnavigator.advanced_display_block": "고급 전광판 블록", - "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "_도착역 정보_와 _승객 안내용 정보_를 표시하도록 _차내전광판_으로 사용하거나, _열차역_에서 사용하여 일반 전광판보다 더 많은 정보를 표시합니다.", + "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "_도착역 정보_와 _승객 안내용 정보_를 표시하도록 _차내전광판_으로 사용하거나, _열차역_에서 사용하여 일반 전광판보다 더 많은 정보를 표시합니다.", "block.createrailwaysnavigator.advanced_display_block.tooltip.condition1": "렌치를 사용하여 우클릭할 경우", - "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "_전광판_을 _설정_하는 메뉴를 엽니다.", + "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "_전광판_을 _설정_하는 메뉴를 엽니다.", "block.createrailwaysnavigator.advanced_display": "고급 전광판", - "block.createrailwaysnavigator.advanced_display.tooltip.summary": "_도착역 정보_와 _승객 안내용 정보_를 표시하도록 _차내전광판_으로 사용하거나, _열차역_에서 사용하여 일반 전광판보다 더 많은 정보를 표시합니다.", + "block.createrailwaysnavigator.advanced_display.tooltip.summary": "_도착역 정보_와 _승객 안내용 정보_를 표시하도록 _차내전광판_으로 사용하거나, _열차역_에서 사용하여 일반 전광판보다 더 많은 정보를 표시합니다.", "block.createrailwaysnavigator.advanced_display.tooltip.condition1": "렌치를 사용하여 우클릭할 경우", - "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "_전광판_을 _설정_하는 메뉴를 엽니다.", + "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "_전광판_을 _설정_하는 메뉴를 엽니다.", "block.createrailwaysnavigator.advanced_display_small": "소형 고급 전광판", - "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "_도착역 정보_와 _승객 안내용 정보_를 표시하도록 _차내전광판_으로 사용하거나, _열차역_에서 사용하여 일반 전광판보다 더 많은 정보를 표시합니다.", + "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "_도착역 정보_와 _승객 안내용 정보_를 표시하도록 _차내전광판_으로 사용하거나, _열차역_에서 사용하여 일반 전광판보다 더 많은 정보를 표시합니다.", "block.createrailwaysnavigator.advanced_display_small.tooltip.condition1": "렌치를 사용하여 우클릭할 경우", - "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "_전광판_을 _설정_하는 메뉴를 엽니다.", + "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "_전광판_을 _설정_하는 메뉴를 엽니다.", "block.createrailwaysnavigator.advanced_display_panel": "고급 전광판 판넬", - "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "_도착역 정보_와 _승객 안내용 정보_를 표시하도록 _차내전광판_으로 사용하거나, _열차역_에서 사용하여 일반 전광판보다 더 많은 정보를 표시합니다.", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "_도착역 정보_와 _승객 안내용 정보_를 표시하도록 _차내전광판_으로 사용하거나, _열차역_에서 사용하여 일반 전광판보다 더 많은 정보를 표시합니다.", "block.createrailwaysnavigator.advanced_display_panel.tooltip.condition1": "렌치를 사용하여 우클릭할 경우", - "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "_전광판_을 _설정_하는 메뉴를 엽니다.", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "_전광판_을 _설정_하는 메뉴를 엽니다.", "block.createrailwaysnavigator.advanced_display_half_panel": "고급 전광판 반블록", - "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "_도착역 정보_와 _승객 안내용 정보_를 표시하도록 _차내전광판_으로 사용하거나, _열차역_에서 사용하여 일반 전광판보다 더 많은 정보를 표시합니다.", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "_도착역 정보_와 _승객 안내용 정보_를 표시하도록 _차내전광판_으로 사용하거나, _열차역_에서 사용하여 일반 전광판보다 더 많은 정보를 표시합니다.", "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.condition1": "렌치를 사용하여 우클릭할 경우", - "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "_전광판_을 _설정_하는 메뉴를 엽니다.", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "_전광판_을 _설정_하는 메뉴를 엽니다.", "block.createrailwaysnavigator.advanced_display_sloped": "역경사형 고급 전광판", - "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "_도착역 정보_와 _승객 안내용 정보_를 표시하도록 _차내전광판_으로 사용하거나, _열차역_에서 사용하여 일반 전광판보다 더 많은 정보를 표시합니다.", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "_도착역 정보_와 _승객 안내용 정보_를 표시하도록 _차내전광판_으로 사용하거나, _열차역_에서 사용하여 일반 전광판보다 더 많은 정보를 표시합니다.", "block.createrailwaysnavigator.advanced_display_sloped.tooltip.condition1": "렌치를 사용하여 우클릭할 경우", - "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "_전광판_을 _설정_하는 메뉴를 엽니다.", - + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "_전광판_을 _설정_하는 메뉴를 엽니다.", "block.createrailwaysnavigator.advanced_display.ber.not_in_service": "점검 중", - "block.createrailwaysnavigator.advanced_display.ber.shunting_trip": "무승객열차", - "category.createrailwaysnavigator.crn": "Create 철도 탐색기", "key.createrailwaysnavigator.route_overlay_options": "경로 오버레이 옵션 보이기", - "enum.createrailwaysnavigator.overlay_position": "안내판 위치", "enum.createrailwaysnavigator.overlay_position.info.top_left": "좌측 상단", "enum.createrailwaysnavigator.overlay_position.info.top_right": "우측 상단", "enum.createrailwaysnavigator.overlay_position.info.bottom_left": "좌측 하단", "enum.createrailwaysnavigator.overlay_position.info.bottom_right": "우측 하단", - "gui.createrailwaysnavigator.loading.title": "서버에서 데이터를 가져옵니다...", - "gui.createrailwaysnavigator.overlay_settings.title": "경로 오버레이 설정", "gui.createrailwaysnavigator.route_overlay_settings.show_details": "자세히 보기", "gui.createrailwaysnavigator.route_overlay_settings.unpin": "경로 오버레이 삭제", "gui.createrailwaysnavigator.route_overlay_settings.narrator.on": "안내방송 활성화", - "gui.createrailwaysnavigator.route_overlay_settings.narrator.off": "안내방송 비활성화", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.off": "안내방송 비활성화", "gui.createrailwaysnavigator.route_overlay_settings.notifications.on": "알림 활성화", "gui.createrailwaysnavigator.route_overlay_settings.notifications.off": "알림 비활성화", "gui.createrailwaysnavigator.route_overlay_settings.scale": "안내창 크기", @@ -61,7 +51,6 @@ "gui.createrailwaysnavigator.route_overlay_settings.narrator.description": "열차 운행 중 중요한 정보 (도착역, 변경사항 등)에 대한 음성 안내를 받습니다.", "gui.createrailwaysnavigator.route_overlay_settings.notifications": "알림", "gui.createrailwaysnavigator.route_overlay_settings.notifications.description": "열차 운행 중 중요한 정보 (도착역, 변경사항 등)에 대한 알림을 받습니다.", - "gui.createrailwaysnavigator.common.expand": "자세히 보기", "gui.createrailwaysnavigator.common.collapse": "숨기기", "gui.createrailwaysnavigator.common.go_back": "뒤로", @@ -73,7 +62,6 @@ "gui.createrailwaysnavigator.common.search": "검색", "gui.createrailwaysnavigator.common.auto": "자동", "gui.createrailwaysnavigator.common.server_error": "작업을 수행하던 중 서버 오류가 발생했습니다. 자세한 정보는 콘솔을 확인하십시오.", - "gui.createrailwaysnavigator.navigator.title": "Create 철도 탐색기", "gui.createrailwaysnavigator.navigator.no_connections": "연결된 열차가 없습니다.", "gui.createrailwaysnavigator.navigator.not_searched": "아직 검색되지 않았습니다.", @@ -89,13 +77,10 @@ "gui.createrailwaysnavigator.navigator.search.tooltip": "검색", "gui.createrailwaysnavigator.navigator.location.tooltip": "현재 위치에서 가장 가까운 열차", "gui.createrailwaysnavigator.navigator.switch.tooltip": "영역 전환", - "gui.createrailwaysnavigator.route_details.title": "경로 상세", "gui.createrailwaysnavigator.route_details.departure": "출발 시각", "gui.createrailwaysnavigator.route_details.next_transfer_time": "환승 시각", "gui.createrailwaysnavigator.route_details.transfer": "환승", - "gui.createrailwaysnavigator.route_details.save_route": "연결 저장", - "gui.createrailwaysnavigator.route_overview.title": "경로 상세", "gui.createrailwaysnavigator.route_overview.journey_begins": "%s 열차, %s 행, 출발시각 %s", "gui.createrailwaysnavigator.route_overview.journey_begins_with_platform": "%s 열차, %s 행, 출발시각 %s, 타는 곳 %s", @@ -125,7 +110,7 @@ "gui.createrailwaysnavigator.route_overview.notification.platform_changed.title": "타는 곳이 변경되었습니다!", "gui.createrailwaysnavigator.route_overview.notification.platform_changed": "%s의 열차는 오늘 타는 곳 %s으로 들어올 예정입니다.", "gui.createrailwaysnavigator.route_overview.notification.train_delayed.title": "%s의 %s 지연에 관한 안내", - "gui.createrailwaysnavigator.route_overview.notification.train_delayed": "%s 도착 예정, 기존 시각 %s (%s)", + "gui.createrailwaysnavigator.route_overview.notification.train_delayed": "%s 도착 예정, 기존 시각 %s (%s)", "gui.createrailwaysnavigator.route_overview.notification.train_cancelled.title": "%s 열차 취소에 관한 안내", "gui.createrailwaysnavigator.route_overview.notification.train_cancelled": "%s에서 탑승해야 할 %s행 열차가 취소되었습니다.", "gui.createrailwaysnavigator.route_overview.notification.transfer.title": "곧 환승해야 합니다.", @@ -138,7 +123,6 @@ "gui.createrailwaysnavigator.route_overview.notification.journey_completed.title": "운행 완료.", "gui.createrailwaysnavigator.route_overview.notification.journey_completed": "오늘도 철도를 이용해주셔서 고맙습니다. 가시는 목적지까지 안녕히 가십시오.", "gui.createrailwaysnavigator.route_overview.date": "%s일, %s", - "gui.createrailwaysnavigator.global_settings.title": "광역 설정", "gui.createrailwaysnavigator.global_settings.option.tooltip": "클릭하여 수정하기", "gui.createrailwaysnavigator.global_settings.option_alias.title": "기차역 태그", @@ -149,8 +133,6 @@ "gui.createrailwaysnavigator.global_settings.train_group.description": "기차 그룹을 만들어 다양한 목적의 열차(지역열차, 광역열차 등)를 관리합니다. 원하는 그룹을 사용할 수도 있습니다.", "gui.createrailwaysnavigator.global_settings.train_blacklist.title": "기차 블랙리스트", "gui.createrailwaysnavigator.global_settings.train_blacklist.description": "기차 블랙리스트에 등록된 기차(예: 화물열차, 특수열차)는 경로 추천에 사용되지 않습니다.", - - "gui.createrailwaysnavigator.station_tags.title": "기차역 태그 설정", "gui.createrailwaysnavigator.station_tags.summary": "%s개의 타는 곳 포함", "gui.createrailwaysnavigator.station_tags.editor": "%s님이 %s에 마지막으로 수정함", "gui.createrailwaysnavigator.station_tags.add.tooltip": "새 태그 추가", @@ -160,22 +142,18 @@ "gui.createrailwaysnavigator.station_tags.hint.station_name": "정거장 이름", "gui.createrailwaysnavigator.station_tags.hint.platform": "타는 곳", "gui.createrailwaysnavigator.station_tags.enter_name": "이름 입력", - "gui.createrailwaysnavigator.train_group_settings.title": "기차 그룹 설정", "gui.createrailwaysnavigator.train_group_settings.summary": "%s개의 기차 포함", "gui.createrailwaysnavigator.train_group_settings.editor": "%s이/가 %s에 마지막으로 편집", "gui.createrailwaysnavigator.train_group_settings.delete_alias.tooltip": "그룹 삭제", "gui.createrailwaysnavigator.train_group_settings.delete_station.tooltip": "기차 삭제", "gui.createrailwaysnavigator.train_group_settings.add_station.tooltip": "기차 추가", - "gui.createrailwaysnavigator.blacklist.title": "기차역 블랙리스트", "gui.createrailwaysnavigator.blacklist.add.tooltip": "블랙리스트에 추가", "gui.createrailwaysnavigator.blacklist.delete.tooltip": "블랙리스트에서 삭제", - "gui.createrailwaysnavigator.train_blacklist.title": "기차 블랙리스트", "gui.createrailwaysnavigator.train_blacklist.add.tooltip": "블랙리스트에 추가", "gui.createrailwaysnavigator.train_blacklist.delete.tooltip": "블랙리스트에서 삭제", - "gui.createrailwaysnavigator.search_settings.title": "검색 설정", "gui.createrailwaysnavigator.search_settings.transfer_time": "최소 환승 시간", "gui.createrailwaysnavigator.search_settings.transfer_time.description": "환승하는 데 걸릴 최소 시간을 설정합니다. (실제 시간 기준 1시간 ~ 50초)", @@ -185,29 +163,24 @@ "gui.createrailwaysnavigator.search_settings.train_groups.overview.all": "모두선택", "gui.createrailwaysnavigator.search_settings.train_groups.overview.none": "선택취소", "gui.createrailwaysnavigator.search_settings.train_groups.tooltip.reset": "필터 초기화", - "gui.createrailwaysnavigator.new_text_entry.add.tooltip": "추가하기", - "gui.createrailwaysnavigator.time": "현재시각 %s", "gui.createrailwaysnavigator.time.now": "지금", "gui.createrailwaysnavigator.time_format.dhm": "%s일 %s시간 %s분", "gui.createrailwaysnavigator.time_format.hm": "%s시간 %s분", "gui.createrailwaysnavigator.time_format.m": "%s분", - "gui.createrailwaysnavigator.platform": "타는 곳", "gui.createrailwaysnavigator.departure": "출발시간", "gui.createrailwaysnavigator.destination": "도착역", "gui.createrailwaysnavigator.line": "열차종류", "gui.createrailwaysnavigator.following_trains": "다음 열차", "gui.createrailwaysnavigator.via": "경유: ", - "gui.createrailwaysnavigator.advanced_display_settings.title": "고급 전광판 설정", "gui.createrailwaysnavigator.advanced_display_settings.display_type": "전광판 종류", "gui.createrailwaysnavigator.advanced_display_settings.display_type.description": "어디에 사용할 전광판인지 결정합니다.", "gui.createrailwaysnavigator.advanced_display_settings.info_type": "표시 내용", "gui.createrailwaysnavigator.advanced_display_settings.info_type.description": "내용의 상세 정도를 결정합니다.", "gui.createrailwaysnavigator.advanced_display_settings.double_sided": "양면 표기", - "enum.createrailwaysnavigator.display_info_type": "전광판 표시 내용", "enum.createrailwaysnavigator.display_info_type.description": "전광판에 어느정도 내용까지 표시할지 결정합니다.", "enum.createrailwaysnavigator.display_info_type.simple": "간단하게", @@ -216,7 +189,6 @@ "enum.createrailwaysnavigator.display_info_type.info.detailed": "기차 속도, 경유지와 같은 중요한 정보들도 표시합니다.", "enum.createrailwaysnavigator.display_info_type.informative": "풍부하게", "enum.createrailwaysnavigator.display_info_type.info.informative": "흥미로울 수 있는 모든 정보를 멋지게 표시합니다. 작은 전광판에선 글씨가 작아질 수 있습니다.", - "enum.createrailwaysnavigator.display_type": "전광판 종류", "enum.createrailwaysnavigator.display_type.description": "각각의 목적에 맞는 전광판을 선택합니다.", "enum.createrailwaysnavigator.display_type.train_destination": "열차 행선지", @@ -225,26 +197,22 @@ "enum.createrailwaysnavigator.display_type.info.passenger_information": "기차 내부에 설치되는 전광판으로, 다음 역, 내릴 문, 기차 속도(선택한 경우), 기차 경로 정보 등을 표시합니다.", "enum.createrailwaysnavigator.display_type.platform": "승강장 전광판", "enum.createrailwaysnavigator.display_type.info.platform": "승강장에 설치되는 전광판으로, 다음에 도착할 열차와 그 열차의 정보 등을 표시합니다. 열차에는 사용할 수 없습니다!", - "enum.createrailwaysnavigator.side": "전광판 위치", "enum.createrailwaysnavigator.side.description": "전광판이 어느 쪽에 표시될지 결정합니다.", "enum.createrailwaysnavigator.side.front": "앞쪽", "enum.createrailwaysnavigator.side.info.front": "전광판의 앞면에 표시됩니다. (기본)", "enum.createrailwaysnavigator.side.both": "양쪽", "enum.createrailwaysnavigator.side.info.both": "전광판의 양면에 표시됩니다.", - "enum.createrailwaysnavigator.time_display": "시간 표기법", "enum.createrailwaysnavigator.time_display.description": "시간을 표시할 방법을 결정합니다.", "enum.createrailwaysnavigator.time_display.abs": "절대", "enum.createrailwaysnavigator.time_display.info.abs": "정확한 시간을 띄웁니다. (기본)", "enum.createrailwaysnavigator.time_display.eta": "상대", "enum.createrailwaysnavigator.time_display.info.eta": "남은 시간을 띄웁니다.", - "create.display_source.advanced_display": "고급 전광판", "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width": "기차 이름 폭", "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description": "픽셀 단위. (기본: 16)", "gui.createrailwaysnavigator.display_source.advanced_display.platform_width": "타는 곳 이름 폭", "gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description": "픽셀 단위. (기본: 자동)", - - "createrailwaysnavigator.moin": "moin" + "gui.createrailwaysnavigator.station_tags.title": "기차역 태그 설정" } diff --git a/common/src/main/resources/assets/createrailwaysnavigator/lang/nl_nl.json b/common/src/main/resources/assets/createrailwaysnavigator/lang/nl_nl.json index 58006b95..7a5ff9d9 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/lang/nl_nl.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/lang/nl_nl.json @@ -3,51 +3,46 @@ "advancement.createrailwaysnavigator.navigator.description": "Craft een Navigator om treinverbindingen van het ene treinstation naar het andere te zoeken.", "advancement.createrailwaysnavigator.advanced_display": "Nog net geen 4k", "advancement.createrailwaysnavigator.advanced_display.description": "Upgrade je displayborden om meer informatie weer te geven en plaats ze zelfs in je treinen.", - - "itemGroup.createrailwaysnavigator.tab": "Create Railways Navigator", - "item.createrailwaysnavigator.navigator": "Create Spoorweg Navigator", - "item.createrailwaysnavigator.navigator.tooltip.summary": "De navigator toont de mogelijke _treinverbindingen_ met extra informatie zoals _tussenstops_, _real-time data_ en meer.", - + "item.createrailwaysnavigator.navigator.tooltip.summary": "De navigator toont de mogelijke _treinverbindingen_ met extra informatie zoals _tussenstops_, _real-time data_ en meer.", "block.createrailwaysnavigator.train_station_clock": "Treinstation Klok", "block.createrailwaysnavigator.advanced_display_block": "Geavanceerd Display Blok", - "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "Gebruik het op _treinen_, als een _treinbestemmingsdisplay_ of _passagiersinformatiedisplay_, of op _treinstations_ als verbeterde _platformdisplays_ die ook meer informatie tonen dan reguliere displayborden.", + "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "Gebruik het op _treinen_, als een _treinbestemmingsdisplay_ of _passagiersinformatiedisplay_, of op _treinstations_ als verbeterde _platformdisplays_ die ook meer informatie tonen dan reguliere displayborden.", "block.createrailwaysnavigator.advanced_display_block.tooltip.condition1": "Als je R-Clickt met een Wrench", - "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "Opent een menu om het _display_ te _configureren_.", + "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "Opent een menu om het _display_ te _configureren_.", "block.createrailwaysnavigator.advanced_display": "Geavanceerd Display", - "block.createrailwaysnavigator.advanced_display.tooltip.summary": "Gebruik het op _treinen_, als een _treinbestemmingsdisplay_ of _passagiersinformatiedisplay_, of op _treinstations_ als verbeterde _platformdisplays_ die ook meer informatie tonen dan reguliere displayborden.", + "block.createrailwaysnavigator.advanced_display.tooltip.summary": "Gebruik het op _treinen_, als een _treinbestemmingsdisplay_ of _passagiersinformatiedisplay_, of op _treinstations_ als verbeterde _platformdisplays_ die ook meer informatie tonen dan reguliere displayborden.", "block.createrailwaysnavigator.advanced_display.tooltip.condition1": "Als je R-Clickt met een Wrench", - "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "Opent een menu om het _display_ te _configureren_.", + "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "Opent een menu om het _display_ te _configureren_.", "block.createrailwaysnavigator.advanced_display_small": "Klein Geavanceerd Display", - "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "Gebruik het op _treinen_, als een _treinbestemmingsdisplay_ of _passagiersinformatiedisplay_, of op _treinstations_ als verbeterde _platformdisplays_ die ook meer informatie tonen dan reguliere displayborden.", + "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "Gebruik het op _treinen_, als een _treinbestemmingsdisplay_ of _passagiersinformatiedisplay_, of op _treinstations_ als verbeterde _platformdisplays_ die ook meer informatie tonen dan reguliere displayborden.", "block.createrailwaysnavigator.advanced_display_small.tooltip.condition1": "Als je R-Clickt met een Wrench", - "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "Opent een menu om het _display_ te _configureren_.", + "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "Opent een menu om het _display_ te _configureren_.", "block.createrailwaysnavigator.advanced_display_panel": "Geadvanceerd Display Paneel", - "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "Gebruik het op _treinen_, als een _treinbestemmingsdisplay_ of _passagiersinformatiedisplay_, of op _treinstations_ als verbeterde _platformdisplays_ die ook meer informatie tonen dan reguliere displayborden.", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "Gebruik het op _treinen_, als een _treinbestemmingsdisplay_ of _passagiersinformatiedisplay_, of op _treinstations_ als verbeterde _platformdisplays_ die ook meer informatie tonen dan reguliere displayborden.", "block.createrailwaysnavigator.advanced_display_panel.tooltip.condition1": "Als je R-Clickt met een Wrench", - "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "Opent een menu om het _display_ te _configureren_.", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "Opent een menu om het _display_ te _configureren_.", "block.createrailwaysnavigator.advanced_display_half_panel": "Half Geadvanceerd Display Paneel", - "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "Gebruik het op _treinen_, als een _treinbestemmingsdisplay_ of _passagiersinformatiedisplay_, of op _treinstations_ als verbeterde _platformdisplays_ die ook meer informatie tonen dan reguliere displayborden.", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "Gebruik het op _treinen_, als een _treinbestemmingsdisplay_ of _passagiersinformatiedisplay_, of op _treinstations_ als verbeterde _platformdisplays_ die ook meer informatie tonen dan reguliere displayborden.", "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.condition1": "Als je R-Clickt met een Wrench", - "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "Opent een menu om het _display_ te _configureren_.", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "Opent een menu om het _display_ te _configureren_.", "block.createrailwaysnavigator.advanced_display_sloped": "Schuine Geavanceerde Display", - "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "Gebruik het op _treinen_, als een _treinbestemmingsdisplay_ of _passagiersinformatiedisplay_, of op _treinstations_ als verbeterde _platformdisplays_ die ook meer informatie tonen dan reguliere displayborden.", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "Gebruik het op _treinen_, als een _treinbestemmingsdisplay_ of _passagiersinformatiedisplay_, of op _treinstations_ als verbeterde _platformdisplays_ die ook meer informatie tonen dan reguliere displayborden.", "block.createrailwaysnavigator.advanced_display_sloped.tooltip.condition1": "Als je R-Clickt met een Wrench", - "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "Opent een menu om het _display_ te _configureren_.", - + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "Opent een menu om het _display_ te _configureren_.", + "block.createrailwaysnavigator.advanced_display_slab": "Geavanceerde Display-plaat", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.summary": "Gebruik het op _treinen_, als _treinbestemmingsdisplay_ of _passagiersinformatiedisplay_, of op _treinstations_ als verbeterde _perrondisplays_ die ook meer informatie tonen dan de normale displayborden.", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.condition1": "Als je R-Klikt met een Moersleutel", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.behaviour1": "Open een menu om het _display_ te _configureren_.", "block.createrailwaysnavigator.advanced_display.ber.not_in_service": "Buiten dienst!", - "category.createrailwaysnavigator.crn": "Create Railways Navigator", "key.createrailwaysnavigator.route_overlay_options": "Toon Route Overlay Opties", - "enum.createrailwaysnavigator.overlay_position": "Display Positie", "enum.createrailwaysnavigator.overlay_position.info.top_left": "Bovenste Linkerhoek", "enum.createrailwaysnavigator.overlay_position.info.top_right": "Bovenste Rechterhoek", "enum.createrailwaysnavigator.overlay_position.info.bottom_left": "Onderste Linkerhoek", "enum.createrailwaysnavigator.overlay_position.info.bottom_right": "Onderste Rechterhoek", - "gui.createrailwaysnavigator.loading.title": "Gegevens downloaden van server...", - "gui.createrailwaysnavigator.overlay_settings.title": "Route Overlay Instellingen", "gui.createrailwaysnavigator.route_overlay_settings.show_details": "Toon details", "gui.createrailwaysnavigator.route_overlay_settings.unpin": "Verwijder route overlay", @@ -60,7 +55,6 @@ "gui.createrailwaysnavigator.route_overlay_settings.narrator.description": "De verteller kondigt belangrijke gebeurtenissen aan tijdens uw reis, bijv. de volgende stop, wijzigingen, etc.", "gui.createrailwaysnavigator.route_overlay_settings.notifications": "Meldingen", "gui.createrailwaysnavigator.route_overlay_settings.notifications.description": "Ontvang toast meldingen over belangrijke gebeurtenissen tijdens uw reis, bijv. de volgende stop, wijzigingen, etc.", - "gui.createrailwaysnavigator.common.expand": "Toon Details", "gui.createrailwaysnavigator.common.collapse": "Verberg Details", "gui.createrailwaysnavigator.common.go_back": "Ga Terug", @@ -72,7 +66,9 @@ "gui.createrailwaysnavigator.common.search": "Zoeken", "gui.createrailwaysnavigator.common.auto": "Auto", "gui.createrailwaysnavigator.common.server_error": "Serverfout tijdens het uitvoeren van taak. Kijk console voor details.", - + "gui.createrailwaysnavigator.common.delete": "Verwijder", + "gui.createrailwaysnavigator.common.add": "Voeg toe", + "gui.createrailwaysnavigator.common.help": "Krijg Hulp", "gui.createrailwaysnavigator.navigator.title": "Create Railways Navigator", "gui.createrailwaysnavigator.navigator.no_connections": "Geen verbindingen gevonden.", "gui.createrailwaysnavigator.navigator.not_searched": "Nog niets gezocht.", @@ -87,14 +83,12 @@ "gui.createrailwaysnavigator.navigator.search_settings.tooltip": "Zoekinstellingen", "gui.createrailwaysnavigator.navigator.search.tooltip": "Zoeken", "gui.createrailwaysnavigator.navigator.location.tooltip": "Dichtstbijzijnde station vanaf huidige positie", + "gui.createrailwaysnavigator.navigator.refresh.tooltip": "Vernieuwen", "gui.createrailwaysnavigator.navigator.switch.tooltip": "Velden wisselen", - - "gui.createrailwaysnavigator.route_details.title": "Route Details", + "gui.createrailwaysnavigator.route_details.title": "Routedetails", "gui.createrailwaysnavigator.route_details.departure": "Vertrek in", "gui.createrailwaysnavigator.route_details.next_transfer_time": "Overstap in", "gui.createrailwaysnavigator.route_details.transfer": "Overstap", - "gui.createrailwaysnavigator.route_details.save_route": "Verbinding opslaan", - "gui.createrailwaysnavigator.route_overview.title": "Route Details", "gui.createrailwaysnavigator.route_overview.journey_begins": "Uw reis begint! %s naar %s, vertrek %s", "gui.createrailwaysnavigator.route_overview.journey_begins_with_platform": "Uw reis begint! %s naar %s, vertrek %s op platform %s", @@ -137,7 +131,6 @@ "gui.createrailwaysnavigator.route_overview.notification.journey_completed.title": "U heeft uw bestemming bereikt!", "gui.createrailwaysnavigator.route_overview.notification.journey_completed": "Bedankt voor het reizen en een fijne dag", "gui.createrailwaysnavigator.route_overview.date": "Dag %s, %s", - "gui.createrailwaysnavigator.global_settings.title": "Globale Instellingen", "gui.createrailwaysnavigator.global_settings.option.tooltip": "Klik om te bewerken", "gui.createrailwaysnavigator.global_settings.option_alias.title": "Treinstation Tags", @@ -148,33 +141,28 @@ "gui.createrailwaysnavigator.global_settings.train_group.description": "Maak treingroepen om alle treinen te organiseren (bijv. regionale diensten, langeafstandsdiensten, ...). Gebruikers kunnen beslissen welke groepen ze willen gebruiken.", "gui.createrailwaysnavigator.global_settings.train_blacklist.title": "Trein Zwarte Lijst", "gui.createrailwaysnavigator.global_settings.train_blacklist.description": "Sluit treinen uit, bijv. vrachttreinen, speciale treinen, etc., zodat ze niet worden gebruikt in de routesuggesties.", - - "gui.createrailwaysnavigator.station_tags.title": "Treinstation Tag Instellingen", "gui.createrailwaysnavigator.station_tags.summary": "Bevat %s Spoor Stations", "gui.createrailwaysnavigator.station_tags.editor": "Laatst bewerkt door %s op %s", "gui.createrailwaysnavigator.station_tags.add.tooltip": "Nieuwe invoer maken", "gui.createrailwaysnavigator.station_tags.delete_alias.tooltip": "Tag verwijderen", "gui.createrailwaysnavigator.station_tags.delete_station.tooltip": "Station verwijderen", + "gui.createrailwaysnavigator.station_tags.modify_platform.tooltip": "Klik om te veranderen", "gui.createrailwaysnavigator.station_tags.add_station.tooltip": "Station toevoegen", "gui.createrailwaysnavigator.station_tags.hint.station_name": "Spoor Station Naam", "gui.createrailwaysnavigator.station_tags.hint.platform": "Platform", "gui.createrailwaysnavigator.station_tags.enter_name": "Voer hier de naam in", - "gui.createrailwaysnavigator.train_group_settings.title": "Trein Groep Instellingen", "gui.createrailwaysnavigator.train_group_settings.summary": "Bevat %s Treinen", "gui.createrailwaysnavigator.train_group_settings.editor": "Laatst bewerkt door %s op %s", "gui.createrailwaysnavigator.train_group_settings.delete_alias.tooltip": "Groep verwijderen", "gui.createrailwaysnavigator.train_group_settings.delete_station.tooltip": "Trein verwijderen", "gui.createrailwaysnavigator.train_group_settings.add_station.tooltip": "Trein toevoegen", - "gui.createrailwaysnavigator.blacklist.title": "Treinstation Zwarte Lijst", "gui.createrailwaysnavigator.blacklist.add.tooltip": "Toevoegen aan zwarte lijst", "gui.createrailwaysnavigator.blacklist.delete.tooltip": "Verwijderen van zwarte lijst", - "gui.createrailwaysnavigator.train_blacklist.title": "Trein Zwarte Lijst", "gui.createrailwaysnavigator.train_blacklist.add.tooltip": "Toevoegen aan zwarte lijst", "gui.createrailwaysnavigator.train_blacklist.delete.tooltip": "Verwijderen van zwarte lijst", - "gui.createrailwaysnavigator.search_settings.title": "Zoekinstellingen", "gui.createrailwaysnavigator.search_settings.transfer_time": "Minimale Overstaptijd", "gui.createrailwaysnavigator.search_settings.transfer_time.description": "De minimale tijd die beschikbaar moet zijn om van trein te wisselen. (1u ~ 50 Echte Leven Seconden)", @@ -184,29 +172,25 @@ "gui.createrailwaysnavigator.search_settings.train_groups.overview.all": "Alle", "gui.createrailwaysnavigator.search_settings.train_groups.overview.none": "Geen", "gui.createrailwaysnavigator.search_settings.train_groups.tooltip.reset": "Filter resetten", - "gui.createrailwaysnavigator.new_text_entry.add.tooltip": "Toevoegen", - "gui.createrailwaysnavigator.time": "Tijd: %s", "gui.createrailwaysnavigator.time.now": "nu", "gui.createrailwaysnavigator.time_format.dhm": "%s dagen %s uur. %s min.", "gui.createrailwaysnavigator.time_format.hm": "%s uur. %s min.", "gui.createrailwaysnavigator.time_format.m": "%s min.", - - "gui.createrailwaysnavigator.platform": "Platform", + "gui.createrailwaysnavigator.platform": "Perron", "gui.createrailwaysnavigator.departure": "Vertrek", "gui.createrailwaysnavigator.destination": "Bestemming", "gui.createrailwaysnavigator.line": "Lijn", "gui.createrailwaysnavigator.following_trains": "Volgende treinen:", - + "gui.createrailwaysnavigator.via": "via", "gui.createrailwaysnavigator.advanced_display_settings.title": "Geavanceerde Display Instellingen", - "gui.createrailwaysnavigator.advanced_display_settings.display_type": "Display Type", + "gui.createrailwaysnavigator.advanced_display_settings.display_type": "Type Display", "gui.createrailwaysnavigator.advanced_display_settings.display_type.description": "Bepaalt de weergegeven informatie.", "gui.createrailwaysnavigator.advanced_display_settings.info_type": "Informatie Type", "gui.createrailwaysnavigator.advanced_display_settings.info_type.description": "Bepaalt hoe gedetailleerd de informatie is.", "gui.createrailwaysnavigator.advanced_display_settings.double_sided": "Dubbelzijdig", - - "enum.createrailwaysnavigator.display_info_type": "Display Info Type", + "enum.createrailwaysnavigator.display_info_type": "Type Info Display", "enum.createrailwaysnavigator.display_info_type.description": "Bepaalt hoeveel informatie er op uw displaybord moet worden weergegeven.", "enum.createrailwaysnavigator.display_info_type.simple": "Eenvoudig", "enum.createrailwaysnavigator.display_info_type.info.simple": "Het display toont alleen de belangrijkste informatie zonder extra details.", @@ -214,35 +198,118 @@ "enum.createrailwaysnavigator.display_info_type.info.detailed": "De belangrijkste informatie met enkele details wordt getoond, zoals treinsnelheid, tussenstops, etc.", "enum.createrailwaysnavigator.display_info_type.informative": "Informatief", "enum.createrailwaysnavigator.display_info_type.info.informative": "Toont alle informatie die interessant zou kunnen zijn en geeft deze weer in een fancy layout. Niet aanbevolen voor kleine displays omdat de tekst erg klein kan worden.", - - "enum.createrailwaysnavigator.display_type": "Display Type", + "enum.createrailwaysnavigator.display_type": "Type Display", "enum.createrailwaysnavigator.display_type.description": "Het type van uw display dat afhangt van hun doel.", "enum.createrailwaysnavigator.display_type.train_destination": "Trein Bestemming", "enum.createrailwaysnavigator.display_type.info.train_destination": "Bedoeld om buiten treinen te worden gebruikt, omdat het informatie toont over de trein zelf, zoals de naam, bestemming en (indien geselecteerd) tussenstops en andere informatie.", "enum.createrailwaysnavigator.display_type.passenger_information": "Passagiersinformatie", "enum.createrailwaysnavigator.display_type.info.passenger_information": "Vertegenwoordigt de displays die in treinen worden gevonden. Deze displays zullen de volgende stop, de uitgangsrichting en (indien geselecteerd) de treinsnelheid en een routeoverzicht tonen.", - "enum.createrailwaysnavigator.display_type.platform": "Platform Display", + "enum.createrailwaysnavigator.display_type.platform": "Perrondisplay", "enum.createrailwaysnavigator.display_type.info.platform": "Deze displays moeten worden gebruikt op treinstation platforms en tonen de volgende aankomende treinen met extra details indien geselecteerd. Kan niet worden gebruikt in treinen!", - "enum.createrailwaysnavigator.side": "Zijde", "enum.createrailwaysnavigator.side.description": "De zijde van het blok waar de informatie op moet worden gerenderd.", "enum.createrailwaysnavigator.side.front": "Voorkant", "enum.createrailwaysnavigator.side.info.front": "De informatie wordt alleen aan de voorkant gerenderd. Dit is het standaard gedrag.", "enum.createrailwaysnavigator.side.both": "Beide zijden", "enum.createrailwaysnavigator.side.info.both": "De informatie wordt aan beide zijden gerenderd.", - "enum.createrailwaysnavigator.time_display": "Tijdweergave", "enum.createrailwaysnavigator.time_display.description": "Bepaalt hoe de tijd moet worden weergegeven.", "enum.createrailwaysnavigator.time_display.abs": "ABS", "enum.createrailwaysnavigator.time_display.info.abs": "ABS (absoluut)", "enum.createrailwaysnavigator.time_display.eta": "ETA", "enum.createrailwaysnavigator.time_display.info.eta": "ETA (geschatte aankomsttijd)", - "create.display_source.advanced_display": "Geavanceerde Displays", "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width": "Trein Naam Kolom Breedte", "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description": "De breedte van de treinnaamkolom in blok pixels. (Standaard: 16)", "gui.createrailwaysnavigator.display_source.advanced_display.platform_width": "Platform Kolom Breedte", "gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description": "De breedte van de platformkolom in blok pixels. (Standaard: Auto)", - - "createrailwaysnavigator.moin": "moin" + "gui.createrailwaysnavigator.section_settings.title": "Sectie-instellingen", + "gui.createrailwaysnavigator.section_settings.train_groups": "Treingroep Toewijzen", + "gui.createrailwaysnavigator.section_settings.train_lines": "Treinlijn Toewijzen", + "gui.createrailwaysnavigator.section_settings.include_previous_station": "Voeg begin van het volgende gedeelte toe", + "gui.createrailwaysnavigator.section_settings.usable": "Navigeerbaar", + "gui.createrailwaysnavigator.section_settings.none": "(Geen)", + "createrailwaysnavigator.schedule.condition.dynamic_delay": "Dynamische vertraging", + "createrailwaysnavigator.schedule.condition.dynamic_delay.min_duration": "Minimale duur", + "createrailwaysnavigator.schedule.condition.dynamic_delay.title": "Wacht: %s..%s", + "createrailwaysnavigator.schedule.condition.dynamic_delay.at_least": "of minstens %s", + "createrailwaysnavigator.schedule.instruction.travel_section": "Nieuwe Sectie in de Dienstregeling", + "createrailwaysnavigator.schedule.instruction.travel_section.description": "Begin van een nieuwe sectie van de dienstregeling.", + "createrailwaysnavigator.schedule.instruction.travel_section.configure": "Configureer...", + "createrailwaysnavigator.schedule.instruction.travel_section.train_group": " - Stel Treingroep in: ", + "createrailwaysnavigator.schedule.instruction.travel_section.train_line": " - Stel Treinlijn in: ", + "createrailwaysnavigator.schedule.instruction.travel_section.include_previous_station": " - Voeg begin van de volgende sectie toe: ", + "createrailwaysnavigator.schedule.instruction.travel_section.usable": " - Navigeerbaar: ", + "createrailwaysnavigator.schedule.instruction.reset_timings": "Tijdstippen opnieuw instellen", + "display.createrailwaysnavigator.train_destination.simple": "Compact", + "display.createrailwaysnavigator.train_destination.extended": "Uitgebreid", + "display.createrailwaysnavigator.train_destination.detailed": "Gedetailleerd", + "display.createrailwaysnavigator.passenger_information.running_text": "Bewegende Tekst", + "display.createrailwaysnavigator.passenger_information.detailed_with_schedule": "Gedetailleerd met Dienstregeling", + "display.createrailwaysnavigator.platform.running_text": "Bewegende Tekst", + "display.createrailwaysnavigator.platform.table": "Tabel", + "display.createrailwaysnavigator.platform.focus": "Focus", + "gui.createrailwaysnavigator.saved_routes.title": "Opgeslagen Routes", + "gui.createrailwaysnavigator.schedule_board.title": "Dienstregelingsbord", + "gui.createrailwaysnavigator.station_tags.title": "Treinstation Tag Instellingen", + "gui.createrailwaysnavigator.journey_info.title": "Reisinformatie", + "gui.createrailwaysnavigator.journey_info.date": "Dag %s", + "gui.createrailwaysnavigator.journey_info.train": "%s (%s) naar %s", + "gui.createrailwaysnavigator.color_picker.custom": "Aangepast...", + "gui.createrailwaysnavigator.color_picker.no_color": "Geen Kleur", + "gui.createrailwaysnavigator.schedule_board.view_details": "Bekijk Details", + "gui.createrailwaysnavigator.schedule_board.train_from": "van %s", + "gui.createrailwaysnavigator.search_options.departure_in": "Vertrekt over", + "gui.createrailwaysnavigator.search_options.train_groups": "Treingroepen", + "gui.createrailwaysnavigator.search_options.transfer_time": "Overstaptijd", + "gui.createrailwaysnavigator.search_options.advanced_options": "Geavanceerde Opties", + "gui.createrailwaysnavigator.search_options.train_groups.all": "Alle", + "gui.createrailwaysnavigator.search_options.train_groups.excluded": "%s uitgezonderd", + "gui.createrailwaysnavigator.search_options.saved_routes.all": "Alle", + "gui.createrailwaysnavigator.search_options.saved_routes.excluded": "%s uitgezonderd", + "gui.createrailwaysnavigator.empty_list": "De lijst is leeg", + "gui.createrailwaysnavigator.new_entry.add": "Voeg nieuw item toe", + "gui.createrailwaysnavigator.new_entry.new": "Nieuw:", + "gui.createrailwaysnavigator.saved_routes.saved": "%s opgeslagen", + "gui.createrailwaysnavigator.route_overview.notification.schedule_changed.title": "De Dienstregeling is gewijzigd!", + "gui.createrailwaysnavigator.route_overview.notification.schedule_changed": "De Dienstregeling van een van uw opgeslagen routes is gewijzigd. Raadpleeg de navigator voor deze wijzigingen.", + "gui.createrailwaysnavigator.route_overview.transfers": "%s Transfers", + "gui.createrailwaysnavigator.route_overview.cancelled": "Geannuleerd", + "gui.createrailwaysnavigator.saved_routes.saved_route": "Opgeslagen Route", + "block.createrailwaysnavigator.advanced_display.ber.arrival": "Aankomst", + "block.createrailwaysnavigator.advanced_display.ber.cancelled": "Geannuleerd", + "block.createrailwaysnavigator.advanced_display.ber.delayed": "Vertraging ca. %s minuten", + "block.createrailwaysnavigator.advanced_display.ber.information_about_cancelled": "Informatie over %s: Deze trein is geannuleerd", + "block.createrailwaysnavigator.advanced_display.ber.information_about_delayed": "Informatie over %s: Vertraging ca. %s minuten", + "block.createrailwaysnavigator.advanced_display.ber.cancelled2": ", is geannuleerd vandaag. Onze excuses voor het ongemak.", + "block.createrailwaysnavigator.advanced_display.ber.delayed2": ", vandaag ca. %s minuten vertraagd.", + "block.createrailwaysnavigator.advanced_display.ber.reason": "Reden: ", + "gui.createrailwaysnavigator.route_widget.show_details": "Toon details", + "gui.createrailwaysnavigator.route_widget.save": "Sla op", + "gui.createrailwaysnavigator.route_widget.remove": "Verwijder", + "gui.createrailwaysnavigator.route_widget.share": "Deel...", + "gui.createrailwaysnavigator.saved_routes.in_the_past": "In het verleden", + "gui.createrailwaysnavigator.saved_routes.today": "Vandaag", + "gui.createrailwaysnavigator.saved_routes.tomorrow": "Morgen", + "gui.createrailwaysnavigator.saved_routes.in_days": "Over %s dagen", + "gui.createrailwaysnavigator.saved_route_widget.show_details": "Toon details", + "gui.createrailwaysnavigator.saved_route_widget.share": "Deel...", + "gui.createrailwaysnavigator.saved_route_widget.notifications": "Toon Notificaties", + "gui.createrailwaysnavigator.train_status.unknown_delay": "Vertraging door operaties", + "gui.createrailwaysnavigator.train_status.delay_previous_journey": "Vertraging door de vorige reis", + "gui.createrailwaysnavigator.train_status.red_signal": "Rood Signaal", + "gui.createrailwaysnavigator.train_status.priority_other_train": "Prioriteit van een andere trein", + "gui.createrailwaysnavigator.train_status.delay_other_train": "Vertraging van een andere trein", + "gui.createrailwaysnavigator.train_status.track_closed": "Baan gesloten", + "gui.createrailwaysnavigator.train_status.staff_shortage": "Personeelstekort", + "gui.createrailwaysnavigator.train_status.operational_disruption": "Operationele verstoring", + "gui.createrailwaysnavigator.train_status.special_trip": "Bijzondere reis", + "gui.createrailwaysnavigator.route_details.save_route.tooltip": "Sla route op", + "gui.createrailwaysnavigator.route_details.remove_route.tooltip": "Verwijder route", + "gui.createrailwaysnavigator.route_details.show_popup.tooltip": "Toon Pop-up", + "gui.createrailwaysnavigator.navigator.my_profile": "Mijn Profiel", + "gui.createrailwaysnavigator.navigator.train_initialization_warning": "Sommige routes zijn mogelijk onvolledig of helemaal niet voorgesteld, omdat Create Railways Navigator nog niet alle treinen heeft geïnitialiseerd.", + "gui.createrailwaysnavigator.global_settings.train_line.title": "Treinlijnen", + "gui.createrailwaysnavigator.global_settings.train_line.color": "Selecteer Kleur", + "gui.createrailwaysnavigator.global_settings.train_line.description": "Creëer treinlijnen om verschillende treinen te groeperen, overschrijf hun weergavenaam en pas andere instellingen voor elke lijn aan. (Kan alleen worden toegewezen aan de treinen in de dienstregeling)" } diff --git a/common/src/main/resources/assets/createrailwaysnavigator/lang/pl_pl.json b/common/src/main/resources/assets/createrailwaysnavigator/lang/pl_pl.json index 1999b03d..b58ecd19 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/lang/pl_pl.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/lang/pl_pl.json @@ -1,53 +1,48 @@ { "advancement.createrailwaysnavigator.navigator": "Dziękujemy za podróż", - "advancement.createrailwaysnavigator.navigator.description": "Stwórz Rozkład aby znaleźć połączenie pomiędzy stacjami.", + "advancement.createrailwaysnavigator.navigator.description": "Stwórz Nawigator, aby znaleźć połączenie pomiędzy stacjami.", "advancement.createrailwaysnavigator.advanced_display": "Prawie 4k", "advancement.createrailwaysnavigator.advanced_display.description": "Ulepsz swoje tablice wyświetlające aby wyświetlać jeszcze więcej informacji i umieszczać je w pociągach.", - - "itemGroup.createrailwaysnavigator,tab": "Create Railways Navigator", - - "item.createrailwaysnavigator.navigator": "Rozkład Kolei Create", + "item.createrailwaysnavigator.navigator": "Create Informacja Kolejowa", "item.createrailwaysnavigator.navigator.tooltip.summary": "_Rozkład_ wyświetla możliwe _połączenia_ z dodatkowymi informacjami takimi jak _przystanki_, _informacje na żywo_, itp.", - "block.createrailwaysnavigator.train_station_clock": "Zegar dworcowy", "block.createrailwaysnavigator.advanced_display_block": "Blok Zaawansowanego Wyświetlacza", "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "Używaj na _pociągach_ jako _wyświetlacz celu podróży_ lub _ekranu informacji pasażerskiej_, albo na _stacjach kolejowych_ jako ulepszonych _wyświetlaczy peronowych_ które pokazują więcej informacji niż zwykłe wyświetlacze.", "block.createrailwaysnavigator.advanced_display_block.tooltip.condition1": "Kliknięcie PPM przy pomocy Klucza", - "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "Otwórz menu _konfiguracji_ _wyświetlacza_.", + "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "Otwórz menu, aby _skonfigurować_ _wyświetlacz_.", "block.createrailwaysnavigator.advanced_display": "Zaawansowany Wyświetlacz", "block.createrailwaysnavigator.advanced_display.tooltip.summary": "Używaj na _pociągach_ jako _wyświetlacz celu podróży_ lub _ekranu informacji pasażerskiej_, albo na _stacjach kolejowych_ jako ulepszonych _wyświetlaczy peronowych_ które pokazują więcej informacji niż zwykłe wyświetlacze.", "block.createrailwaysnavigator.advanced_display.tooltip.condition1": "Kliknięcie PPM przy pomocy Klucza", - "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "Otwórz menu _konfiguracji_ _wyświetlacza_.", + "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "Otwórz menu, aby _skonfigurować_ _wyświetlacz_.", "block.createrailwaysnavigator.advanced_display_small": "Mały Zaawansowany Wyświetlacz", "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "Używaj na _pociągach_ jako _wyświetlacz celu podróży_ lub _ekranu informacji pasażerskiej_, albo na _stacjach kolejowych_ jako ulepszonych _wyświetlaczy peronowych_ które pokazują więcej informacji niż zwykłe wyświetlacze.", "block.createrailwaysnavigator.advanced_display_small.tooltip.condition1": "Kliknięcie PPM przy pomocy Klucza", - "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "Otwórz menu _konfiguracji_ _wyświetlacza_.", + "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "Otwórz menu, aby _skonfigurować_ _wyświetlacz_.", "block.createrailwaysnavigator.advanced_display_panel": "Panel Zaawansowanego Wyświetlacza", "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "Używaj na _pociągach_ jako _wyświetlacz celu podróży_ lub _ekranu informacji pasażerskiej_, albo na _stacjach kolejowych_ jako ulepszonych _wyświetlaczy peronowych_ które pokazują więcej informacji niż zwykłe wyświetlacze.", "block.createrailwaysnavigator.advanced_display_panel.tooltip.condition1": "Kliknięcie PPM przy pomocy Klucza", - "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "Otwórz menu _konfiguracji_ _wyświetlacza_.", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "Otwórz menu, aby _skonfigurować_ _wyświetlacz_.", "block.createrailwaysnavigator.advanced_display_half_panel": "Pół zaawansowany panel wyświetlacza", "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "Używaj na _pociągach_ jako _wyświetlacz celu podróży_ lub _ekranu informacji pasażerskiej_, albo na _stacjach kolejowych_ jako ulepszonych _wyświetlaczy peronowych_ które pokazują więcej informacji niż zwykłe wyświetlacze.", "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.condition1": "Kliknięcie PPM przy pomocy Klucza", - "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "Otwórz menu _konfiguracji_ _wyświetlacza_.", - "block.createrailwaysnavigator.advanced_display_sloped": "Pochylony, Zaawansowanego Wyświetlacza", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "Otwórz menu, aby _skonfigurować_ _wyświetlacz_.", + "block.createrailwaysnavigator.advanced_display_sloped": "Pochyły Zaawansowany Wyświetlacz", "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "Używaj na _pociągach_ jako _wyświetlacz celu podróży_ lub _ekranu informacji pasażerskiej_, albo na _stacjach kolejowych_ jako ulepszonych _wyświetlaczy peronowych_ które pokazują więcej informacji niż zwykłe wyświetlacze.", "block.createrailwaysnavigator.advanced_display_sloped.tooltip.condition1": "Kliknięcie PPM przy pomocy Klucza", "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "Otwórz menu _konfiguracji_ _wyświetlacza_.", - + "block.createrailwaysnavigator.advanced_display_slab": "Półblokowy zaawansowany Wyświetlacz", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.summary": "Użyj na pociągach jako wyświetlacz stacji docelowej, jako wyświetlacz informacji pasażerskiej lub na stacjach jako ulepszony wyświetlacz peronowy, który pokazuje więcej informacji.", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.condition1": "Gdy Kliknięty PPM przy pomocy Klucza", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.behaviour1": "Otwórz menu, by skonfigurować wyświetlacz.", "block.createrailwaysnavigator.advanced_display.ber.not_in_service": "Nieczynny!", - - "category.createrailwaysnavigator.crn": "Create Railways Navigator", + "category.createrailwaysnavigator.crn": "Create Informacja Kolejowa", "key.createrailwaysnavigator.route_overlay_options": "Pokaż opcje nakładki trasy", - "enum.createrailwaysnavigator.overlay_position": "Pozycja wyświetlania", "enum.createrailwaysnavigator.overlay_position.info.top_left": "Lewy górny róg", "enum.createrailwaysnavigator.overlay_position.info.top_right": "Prawy górny róg", "enum.createrailwaysnavigator.overlay_position.info.bottom_left": "Dolny lewy róg", "enum.createrailwaysnavigator.overlay_position.info.bottom_right": "Dolny prawy róg", - "gui.createrailwaysnavigator.loading.title": "Pobieranie danych z serwera...", - "gui.createrailwaysnavigator.overlay_settings.title": "Opcje nakładki trasy", "gui.createrailwaysnavigator.route_overlay_settings.show_details": "Pokaż szczegóły", "gui.createrailwaysnavigator.route_overlay_settings.unpin": "Usuń nakładkę trasy", @@ -55,12 +50,11 @@ "gui.createrailwaysnavigator.route_overlay_settings.narrator.off": "Narrator wyłączony.", "gui.createrailwaysnavigator.route_overlay_settings.notifications.on": "Powiadomienie włączone", "gui.createrailwaysnavigator.route_overlay_settings.notifications.off": "Powiadomienie wyłączone", - "gui.createrailwaysnavigator.route_overlay_settings.scale": "Skala nakładki", + "gui.createrailwaysnavigator.route_overlay_settings.scale": "Skala interfejsu", "gui.createrailwaysnavigator.route_overlay_settings.narrator": "Narrator", "gui.createrailwaysnavigator.route_overlay_settings.narrator.description": "Narrator zapowiada wydarzenia na twojej trasie, np. przystanki, przesiadki, itp.", "gui.createrailwaysnavigator.route_overlay_settings.notifications": "Powiadomienia", "gui.createrailwaysnavigator.route_overlay_settings.notifications.description": "Otrzymuj powiadomienia o wydarzeniach w podróży, np. przystanki, przesiadki, itp.", - "gui.createrailwaysnavigator.common.expand": "Pokaż szczegóły", "gui.createrailwaysnavigator.common.collapse": "Ukryj szczegóły", "gui.createrailwaysnavigator.common.go_back": "Wstecz", @@ -70,35 +64,35 @@ "gui.createrailwaysnavigator.common.true": "Tak", "gui.createrailwaysnavigator.common.false": "Nie", "gui.createrailwaysnavigator.common.search": "Szukaj", - "gui.createrailwaysnavigator.common.auto": "Auto", - "gui.createrailwaysnavigator.common.server_error": "Nastąpił błąd podczas wykonywania zadania. Sprawdź konsolę aby otrzymać szczegóły.", - - "gui.createrailwaysnavigator.navigator.title": "Create Railways Navigator", + "gui.createrailwaysnavigator.common.auto": "Automatycznie", + "gui.createrailwaysnavigator.common.server_error": "Nastąpił błąd podczas wykonywania zadania. Sprawdź konsolę, aby zobaczyć szczegóły.", + "gui.createrailwaysnavigator.common.delete": "Usuń", + "gui.createrailwaysnavigator.common.add": "Dodaj", + "gui.createrailwaysnavigator.common.help": "Uzyskaj pomoc", + "gui.createrailwaysnavigator.navigator.title": "Create Informacja Kolejowa", "gui.createrailwaysnavigator.navigator.no_connections": "Nie znaleziono połączeń.", "gui.createrailwaysnavigator.navigator.not_searched": "Jeszcze nic nie wyszukano.", - "gui.createrailwaysnavigator.navigator.searching": "Szukanie połączenia...", + "gui.createrailwaysnavigator.navigator.searching": "Wyszukaj połączenia...", "gui.createrailwaysnavigator.navigator.error_title": "Nie udało się nawigować!", "gui.createrailwaysnavigator.navigator.start_end_null": "Początek lub cel podróży jest pusty.", - "gui.createrailwaysnavigator.navigator.start_end_equal": "Początek i cel podróży jest identyczny.", + "gui.createrailwaysnavigator.navigator.start_end_equal": "Początek i cel podróży są identyczne.", "gui.createrailwaysnavigator.navigator.route_entry.connection_in_past": "❌ Połączenie z przeszłości", - "gui.createrailwaysnavigator.navigator.route_entry.transfer": "Prze.", + "gui.createrailwaysnavigator.navigator.route_entry.transfer": "Przesiadka.", "gui.createrailwaysnavigator.navigator.route_entry.station_start": "z %s", "gui.createrailwaysnavigator.navigator.global_settings.tooltip": "Ustawienia globalne", "gui.createrailwaysnavigator.navigator.search_settings.tooltip": "Ustawienia wyszukiwania", - "gui.createrailwaysnavigator.navigator.search.tooltip": "Search", - "gui.createrailwaysnavigator.navigator.location.tooltip": "Nearest station from current position", + "gui.createrailwaysnavigator.navigator.search.tooltip": "Szukaj", + "gui.createrailwaysnavigator.navigator.location.tooltip": "Najbliższa stacja od bieżącej pozycji", + "gui.createrailwaysnavigator.navigator.refresh.tooltip": "Odśwież", "gui.createrailwaysnavigator.navigator.switch.tooltip": "Zamień pola", - "gui.createrailwaysnavigator.route_details.title": "Szczegóły podróży", "gui.createrailwaysnavigator.route_details.departure": "Odjazd za", - "gui.createrailwaysnavigator.route_details.next_transfer_time": "Transfer in", - "gui.createrailwaysnavigator.route_details.transfer": "Transfer", - "gui.createrailwaysnavigator.route_details.save_route": "Zapisz połączenie", + "gui.createrailwaysnavigator.route_details.next_transfer_time": "Przesiadka w", + "gui.createrailwaysnavigator.route_details.transfer": "Przesiadka", "gui.createrailwaysnavigator.route_overview.title": "Szczegóły podróży", - "gui.createrailwaysnavigator.route_overview.journey_begins": "Twoja podróż rozpoczyna się! %s do %s, odjazd %s", - "gui.createrailwaysnavigator.route_overview.journey_begins_with_platform": "Twoja podróż rozpoczyna się! %s do %s, odjazd %s na peronie %s", + "gui.createrailwaysnavigator.route_overview.journey_begins": "Twoja podróż się rozpoczęła! %s do %s, odjazd %s", + "gui.createrailwaysnavigator.route_overview.journey_begins_with_platform": "Twoja podróż się rozpoczęła! %s do %s, odjazd %s na peronie %s", "gui.createrailwaysnavigator.route_overview.train_details": "%s do %s", - "gui.createrailwaysnavigator.route_overview.train_speed": "%s km/h", "gui.createrailwaysnavigator.route_overview.next_stop": "Następna stacja: %s", "gui.createrailwaysnavigator.route_overview.transfer": "Przesiadka do %s → %s", "gui.createrailwaysnavigator.route_overview.transfer_with_platform": "Przesiadka do %s → %s na peronie %s", @@ -113,138 +107,209 @@ "gui.createrailwaysnavigator.route_overview.connection_missed": "Połączenie przegapione", "gui.createrailwaysnavigator.route_overview.connection_cancelled": "Pociąg odwołany", "gui.createrailwaysnavigator.route_overview.journey_interrupted": "Twoja podróż do %s jest niemożliwa do kontynuowania.", - "gui.createrailwaysnavigator.route_overview.connection_missed_info": "W związku z opóżnieniem pociągu, przegapiłeś połączenie. Wyszukaj inne połączenie w Nawigatorze. Za utrudnienia przepraszamy.", - "gui.createrailwaysnavigator.route_overview.train_cancelled_info": "Informacja o %s: Ten pociąg został odwołany! Za utrudnienia przepraszamy. Wyszukaj inne połączenie w Nawigatorze.", + "gui.createrailwaysnavigator.route_overview.connection_missed_info": "W związku z opóźnieniem pociągu przegapiłeś połączenie. Wyszukaj inne połączenie w Nawigatorze. Za utrudnienia przepraszamy.", + "gui.createrailwaysnavigator.route_overview.train_cancelled_info": "Informacja o %s: Ten pociąg został dzisiaj odwołany! Za utrudnienia przepraszamy. Wyszukaj inne połączenie w Nawigatorze.", "gui.createrailwaysnavigator.route_overview.train_cancelled_title": "Pociąg został odwołany", "gui.createrailwaysnavigator.route_overview.journey_interrupted_info": "Twoja podróż do %s jest niemożliwa do kontynuowania. Wyszukaj inne połączenie w Nawigatorze.", "gui.createrailwaysnavigator.route_overview.options": "Wciśnij %s aby zobaczyć opcje.", - "gui.createrailwaysnavigator.route_overview.notification.journey_begins.title": "Twoja podróż do %s rozpoczyna się!", + "gui.createrailwaysnavigator.route_overview.notification.journey_begins.title": "Twoja podróż do %s została rozpoczęta!", "gui.createrailwaysnavigator.route_overview.notification.journey_begins": "%s do %s, odjazd %s", "gui.createrailwaysnavigator.route_overview.notification.journey_begins_with_platform": "%s do %s, odjazd %s z peronu %s", "gui.createrailwaysnavigator.route_overview.notification.platform_changed.title": "Peron uległ zmianie!", "gui.createrailwaysnavigator.route_overview.notification.platform_changed": "Twój pociąg w %s wyrusza dzisiaj z peronu %s.", - "gui.createrailwaysnavigator.route_overview.notification.train_delayed.title": "%s: Przyjazd %s opóżniony.", + "gui.createrailwaysnavigator.route_overview.notification.train_delayed.title": "%s: Przyjazd %s opóźniony.", "gui.createrailwaysnavigator.route_overview.notification.train_delayed": "%s zamiast %s w %s", "gui.createrailwaysnavigator.route_overview.notification.train_cancelled.title": "%s: Pociąg odwołany", - "gui.createrailwaysnavigator.route_overview.notification.train_cancelled": "%s do %s został odwołany.", + "gui.createrailwaysnavigator.route_overview.notification.train_cancelled": "%s do %s został dzisiaj odwołany.", "gui.createrailwaysnavigator.route_overview.notification.transfer.title": "Nadchodzi przesiadka", - "gui.createrailwaysnavigator.route_overview.notification.transfer": "Przesiadka %s → %s na peronie %s", + "gui.createrailwaysnavigator.route_overview.notification.transfer": "Przesiadka %s → %s", "gui.createrailwaysnavigator.route_overview.notification.transfer_with_platform": "Przesiadka %s → %s na peronie %s", "gui.createrailwaysnavigator.route_overview.notification.connection_endangered.title": "Twoje połączenie jest zagrożone!", "gui.createrailwaysnavigator.route_overview.notification.connection_endangered": "Prawdopodobnie nie dotrzesz %s do %s.", "gui.createrailwaysnavigator.route_overview.notification.connection_missed.title": "Przegapione połączenie", "gui.createrailwaysnavigator.route_overview.notification.connection_missed": "Przegapiłeś swoje połączenie %s do %s.", "gui.createrailwaysnavigator.route_overview.notification.journey_completed.title": "Dotarłeś do swojego celu!", - "gui.createrailwaysnavigator.route_overview.notification.journey_completed": "Dziękujemy za podróż i życzymy miłego dnia.", + "gui.createrailwaysnavigator.route_overview.notification.journey_completed": "Dziękujemy za podróż i życzymy miłego dnia", "gui.createrailwaysnavigator.route_overview.date": "Dzień %s, %s", - "gui.createrailwaysnavigator.global_settings.title": "Ustawienia Globalne", - "gui.createrailwaysnavigator.global_settings.option.tooltip": "Kliknij aby edytować", + "gui.createrailwaysnavigator.global_settings.option.tooltip": "Kliknij, aby edytować", "gui.createrailwaysnavigator.global_settings.option_alias.title": "Tagi stacji", - "gui.createrailwaysnavigator.global_settings.option_alias.description": "Zdefiniuj tagi stacji aby traktować wieloperonowe stacje (np. MyStation 1, MyStation 2, ...) jako jedną stację (np. MyStation) z niestandardową nazwą.", + "gui.createrailwaysnavigator.global_settings.option_alias.description": "Zdefiniuj tagi stacji, aby traktować wieloperonowe stacje (np. MojaStacja 1, MojaStacja 2, ...) jako jedną stację (np. MojaStacja) z niestandardową nazwą.", "gui.createrailwaysnavigator.global_settings.option_blacklist.title": "Czarna lista stacji", - "gui.createrailwaysnavigator.global_settings.option_blacklist.description": "Wyklucz stacje aby nie pojawiały się one w wynikach wyszukiwania. Te stacje będą ignorowane podczas generowania wyników.", + "gui.createrailwaysnavigator.global_settings.option_blacklist.description": "Wyklucz stacje, aby nie pojawiały się one w wynikach wyszukiwania. Te stacje będą ignorowane podczas generowania wyników.", "gui.createrailwaysnavigator.global_settings.train_group.title": "Grupy pociągów", "gui.createrailwaysnavigator.global_settings.train_group.description": "Utwórz grupy pociągów aby podzielić wszystkie pociągi (np. Regio, Krajowy, ...). Użytkownicy mogą decydować którą grupą chcą się poruszać.", "gui.createrailwaysnavigator.global_settings.train_blacklist.title": "Czarna lista pociągów", "gui.createrailwaysnavigator.global_settings.train_blacklist.description": "Wyklucz pociągi, np. towarowe, specjalne, itp., aby nie pojawiały się one w wynikach wyszukiwania.", - - "gui.createrailwaysnavigator.station_tags.title": "Ustawienia tagów stacji", "gui.createrailwaysnavigator.station_tags.summary": "Zawiera %s stacji", "gui.createrailwaysnavigator.station_tags.editor": "Ostatnio edytowane przez %s o %s", "gui.createrailwaysnavigator.station_tags.add.tooltip": "Utwórz nowy wpis", "gui.createrailwaysnavigator.station_tags.delete_alias.tooltip": "Usuń tag", "gui.createrailwaysnavigator.station_tags.delete_station.tooltip": "Usuń stację", + "gui.createrailwaysnavigator.station_tags.modify_platform.tooltip": "Kliknij, aby zmienić", "gui.createrailwaysnavigator.station_tags.add_station.tooltip": "Dodaj stację", "gui.createrailwaysnavigator.station_tags.hint.station_name": "Nazwa stacji", - "gui.createrailwaysnavigator.station_tags.hint.platform": "Peron", + "gui.createrailwaysnavigator.station_tags.hint.platform": "Numer peronu", "gui.createrailwaysnavigator.station_tags.enter_name": "Wprowadź nazwę", - "gui.createrailwaysnavigator.train_group_settings.title": "Ustawienia grupy pociągów", "gui.createrailwaysnavigator.train_group_settings.summary": "Zawiera %s pociągów", "gui.createrailwaysnavigator.train_group_settings.editor": "Ostatnio edytowane przez %s o %s", "gui.createrailwaysnavigator.train_group_settings.delete_alias.tooltip": "Usuń grupę", "gui.createrailwaysnavigator.train_group_settings.delete_station.tooltip": "Usuń pociąg", "gui.createrailwaysnavigator.train_group_settings.add_station.tooltip": "Dodaj pociąg", - "gui.createrailwaysnavigator.blacklist.title": "Czarna lista stacji", "gui.createrailwaysnavigator.blacklist.add.tooltip": "Dodaj do czarnej listy", "gui.createrailwaysnavigator.blacklist.delete.tooltip": "Usuń z czarnej listy", - "gui.createrailwaysnavigator.train_blacklist.title": "Czarna lista pociągów", "gui.createrailwaysnavigator.train_blacklist.add.tooltip": "Dodaj do czarnej listy", "gui.createrailwaysnavigator.train_blacklist.delete.tooltip": "Usuń z czarnej listy", - "gui.createrailwaysnavigator.search_settings.title": "Ustawienia wyszukiwania", "gui.createrailwaysnavigator.search_settings.transfer_time": "Minimalny czas przesiadki", - "gui.createrailwaysnavigator.search_settings.transfer_time.description": "Minimalny czas który powinien być dostępny aby się przesiąść (1godz. w grze ~ 50 sekund)", + "gui.createrailwaysnavigator.search_settings.transfer_time.description": "Minimalny czas na przesiadkę (1 godzina w grze ~ 50 sekund)", "gui.createrailwaysnavigator.search_settings.train_groups": "Filtr kategorii pociągów", - "gui.createrailwaysnavigator.search_settings.train_groups.description": "Zdecyduj z których kategorii chcesz korzystać.", + "gui.createrailwaysnavigator.search_settings.train_groups.description": "Zdecyduj, z których pociągów, jakich kategorii chcesz korzystać.", "gui.createrailwaysnavigator.search_settings.train_groups.overview": "%s wybranych kategorii", "gui.createrailwaysnavigator.search_settings.train_groups.overview.all": "Wszystkie", "gui.createrailwaysnavigator.search_settings.train_groups.overview.none": "Brak", "gui.createrailwaysnavigator.search_settings.train_groups.tooltip.reset": "Resetuj filtr", - "gui.createrailwaysnavigator.new_text_entry.add.tooltip": "Dodaj", - "gui.createrailwaysnavigator.time": "Godzina: %s", "gui.createrailwaysnavigator.time.now": "teraz", "gui.createrailwaysnavigator.time_format.dhm": "%s dni %s godz. %s min.", "gui.createrailwaysnavigator.time_format.hm": "%s godz. %s min.", "gui.createrailwaysnavigator.time_format.m": "%s min.", - "gui.createrailwaysnavigator.platform": "Peron", "gui.createrailwaysnavigator.departure": "Odjazd", "gui.createrailwaysnavigator.destination": "Stacja docelowa", "gui.createrailwaysnavigator.line": "Linia", "gui.createrailwaysnavigator.following_trains": "Następne pociągi:", "gui.createrailwaysnavigator.via": "przez", - "gui.createrailwaysnavigator.advanced_display_settings.title": "Ustawienia Zaawansowanego Wyświetlacza", "gui.createrailwaysnavigator.advanced_display_settings.display_type": "Rodzaj wyświetlacza", "gui.createrailwaysnavigator.advanced_display_settings.display_type.description": "Decyduje o wyświetlanej informacji.", "gui.createrailwaysnavigator.advanced_display_settings.info_type": "Rodzaj informacji", "gui.createrailwaysnavigator.advanced_display_settings.info_type.description": "Określa stopień szczegółowości informacji.", "gui.createrailwaysnavigator.advanced_display_settings.double_sided": "Dwustronna", - "enum.createrailwaysnavigator.display_info_type": "Rodzaj informacji", - "enum.createrailwaysnavigator.display_info_type.description": "Decyduje o tym jak dużo informacji powinno być wyświetlanych.", + "enum.createrailwaysnavigator.display_info_type.description": "Decyduje o tym, jak dużo informacji powinno być wyświetlanych.", "enum.createrailwaysnavigator.display_info_type.simple": "Proste", - "enum.createrailwaysnavigator.display_info_type.info.simple": "Pokazuje tylko najważnejsze informacje bez dodatkowych szczegółów.", - "enum.createrailwaysnavigator.display_info_type.detailed": "Złożone", + "enum.createrailwaysnavigator.display_info_type.info.simple": "Pokazuje tylko najważniejsze informacje bez dodatkowych szczegółów.", + "enum.createrailwaysnavigator.display_info_type.detailed": "Rozszerzone", "enum.createrailwaysnavigator.display_info_type.info.detailed": "Pokazuje tylko najważniejsze informacje takie jak prędkość pociągu, przystanki, itp.", "enum.createrailwaysnavigator.display_info_type.informative": "Szczegółowe", - "enum.createrailwaysnavigator.display_info_type.info.informative": "Pokazuje wszystkie informacji w ładnym układzie. Nie zalecane dla małych wyświelaczy ponieważ tekst może stać się bardzo mały.", - + "enum.createrailwaysnavigator.display_info_type.info.informative": "Pokazuje wszystkie informacje w ładnym układzie. Nie zalecane dla małych wyświetlaczy, ponieważ tekst może stać się bardzo mały.", "enum.createrailwaysnavigator.display_type": "Typ wyświetlacza", - "enum.createrailwaysnavigator.display_type.description": "Rodzaj wyświetlacza który zależy od jego przeznaczenia.", + "enum.createrailwaysnavigator.display_type.description": "Rodzaj wyświetlacza, który zależy od jego przeznaczenia.", "enum.createrailwaysnavigator.display_type.train_destination": "Cel pociągu", - "enum.createrailwaysnavigator.display_type.info.train_destination": "Używany na zewnątrz pociągu w celu pokazywa informacji takich jak nazwa pociągu, jego cel, i (jeśli zaznaczono) przystanków i innych informacji.", + "enum.createrailwaysnavigator.display_type.info.train_destination": "Przeznaczony do użycia na zewnątrz pociągu w celu wyświetlania informacji takich jak: nazwa pociągu, jego cel, i (jeśli zaznaczono) przystanków oraz innych informacji.", "enum.createrailwaysnavigator.display_type.passenger_information": "Informacja pasażerska", - "enum.createrailwaysnavigator.display_type.info.passenger_information": "Wyświetlacze wewnątrz pociągu. Te wyświetlacze będą pokazywać następny przystanek, kierunek wyjścia i (jeśli zaznaczono) prędkość pociągu i przegląd trasy.", + "enum.createrailwaysnavigator.display_type.info.passenger_information": "Wyświetlacze wewnątrz pociągu. Te wyświetlacze będą pokazywać następny przystanek, kierunek wyjścia i (jeśli zaznaczono) prędkość i trasę pociągu.", "enum.createrailwaysnavigator.display_type.platform": "Wyświetlacz peronowy", - "enum.createrailwaysnavigator.display_type.info.platform": "Te wyświetlacze powinny być używane na peronach stacji i pokazywać pociągi i informacje o nich. Nie można używać w pociągach!", - + "enum.createrailwaysnavigator.display_type.info.platform": "Te wyświetlacze powinny być używane na peronach stacji i pokazywać pociągi oraz dodatkowe informacje o nich. Nie można ich używać w pociągach!", "enum.createrailwaysnavigator.side": "Strona", - "enum.createrailwaysnavigator.side.description": "Strona bloku po której powinna być wyświetlana treść.", + "enum.createrailwaysnavigator.side.description": "Strona bloku, po której powinna być wyświetlana treść.", "enum.createrailwaysnavigator.side.front": "Przód", "enum.createrailwaysnavigator.side.info.front": "Informacje będą wyświetlane tylko na przedniej stronie. To jest domyślne zachowanie.", "enum.createrailwaysnavigator.side.both": "Obie strony", - "enum.createrailwaysnavigator.side.info.both": "Informacje będą wyświetlane tylko na obu stronach.", - - "enum.createrailwaysnavigator.time_display": "Wyświetlanie czasu", + "enum.createrailwaysnavigator.side.info.both": "Informacje będą wyświetlane na obu stronach.", + "enum.createrailwaysnavigator.time_display": "Wyświetlacz czasu", "enum.createrailwaysnavigator.time_display.description": "Określa sposób wyświetlania czasu.", "enum.createrailwaysnavigator.time_display.abs": "ABS", "enum.createrailwaysnavigator.time_display.info.abs": "ABS (absolutny)", "enum.createrailwaysnavigator.time_display.eta": "ETA", "enum.createrailwaysnavigator.time_display.info.eta": "ETA (Przewidywany czas przybycia)", - "create.display_source.advanced_display": "Zaawansowane Wyświetlacze", "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width": "Szerokość kolumny nazw pociągów", - "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description": "Szerokość kolumny w pixelach blokowych. (Domyślnie: 16)", + "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description": "Szerokość kolumny w pixelach. (Domyślnie: 16)", "gui.createrailwaysnavigator.display_source.advanced_display.platform_width": "Szerokość kolumny peronu", - "gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description": "Szerokość kolumny w pixelach blokowych. (-1 = Auto, Domyślnie: -1)", - - "createrailwaysnavigator.moin": "moin" - } - \ No newline at end of file + "gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description": "Szerokość kolumny w pixelach. (Domyślnie: Automatycznie)", + "gui.createrailwaysnavigator.section_settings.title": "Ustawienia sekcji", + "gui.createrailwaysnavigator.section_settings.train_groups": "Przypisz grupę pociągów", + "gui.createrailwaysnavigator.section_settings.train_lines": "Przypisz linię pociągów", + "gui.createrailwaysnavigator.section_settings.include_previous_station": "Uwzględnij początek następnej sekcji", + "gui.createrailwaysnavigator.section_settings.usable": "Przejazd Pasażerski", + "gui.createrailwaysnavigator.section_settings.none": "(Brak)", + "createrailwaysnavigator.schedule.condition.dynamic_delay": "Dynamiczne Opóźnienie", + "createrailwaysnavigator.schedule.condition.dynamic_delay.min_duration": "Minimalny czas trwania", + "createrailwaysnavigator.schedule.condition.dynamic_delay.title": "Czekaj: %s..%s", + "createrailwaysnavigator.schedule.condition.dynamic_delay.at_least": "lub przynajmniej %s", + "createrailwaysnavigator.schedule.instruction.travel_section": "Nowy bieg pociągu", + "createrailwaysnavigator.schedule.instruction.travel_section.description": "Początek nowego biegu pociągu.", + "createrailwaysnavigator.schedule.instruction.travel_section.configure": "Konfiguruj...", + "createrailwaysnavigator.schedule.instruction.travel_section.train_group": " - Ustaw grupę pociągu: ", + "createrailwaysnavigator.schedule.instruction.travel_section.train_line": " - Ustaw linię pociągu: ", + "createrailwaysnavigator.schedule.instruction.travel_section.include_previous_station": " - Uwzględnij początek następnej sekcji: ", + "createrailwaysnavigator.schedule.instruction.travel_section.usable": " - Przejazd Pasażerski: ", + "createrailwaysnavigator.schedule.instruction.reset_timings": "Zresetuj Opóźnienia", + "display.createrailwaysnavigator.train_destination.simple": "Skrócony", + "display.createrailwaysnavigator.train_destination.extended": "Rozszerzony", + "display.createrailwaysnavigator.train_destination.detailed": "Szczegółowy", + "display.createrailwaysnavigator.passenger_information.running_text": "Tekst przewijający", + "display.createrailwaysnavigator.passenger_information.detailed_with_schedule": "Szczegółowe z Rozkładem", + "display.createrailwaysnavigator.platform.running_text": "Tekst przewijający", + "display.createrailwaysnavigator.platform.table": "Tabela", + "display.createrailwaysnavigator.platform.focus": "Skupiony", + "gui.createrailwaysnavigator.saved_routes.title": "Zapisane trasy", + "gui.createrailwaysnavigator.schedule_board.title": "Tablica Odjazdów", + "gui.createrailwaysnavigator.station_tags.title": "Ustawienia tagów stacji", + "gui.createrailwaysnavigator.journey_info.title": "Informacje o podróży", + "gui.createrailwaysnavigator.journey_info.date": "Dzień, %s", + "gui.createrailwaysnavigator.journey_info.train": "%s (%s) do %s", + "gui.createrailwaysnavigator.color_picker.custom": "Niestandardowy...", + "gui.createrailwaysnavigator.color_picker.no_color": "Brak koloru", + "gui.createrailwaysnavigator.schedule_board.view_details": "Wyświetl szczegóły", + "gui.createrailwaysnavigator.schedule_board.train_from": "z %s", + "gui.createrailwaysnavigator.search_options.departure_in": "Odjazd za", + "gui.createrailwaysnavigator.search_options.train_groups": "Grupy pociągów", + "gui.createrailwaysnavigator.search_options.transfer_time": "Czas przesiadki", + "gui.createrailwaysnavigator.search_options.advanced_options": "Opcje zaawansowane", + "gui.createrailwaysnavigator.search_options.train_groups.all": "Wszystkie", + "gui.createrailwaysnavigator.search_options.train_groups.excluded": "%s wykluczonych", + "gui.createrailwaysnavigator.search_options.saved_routes.all": "Wszystkie", + "gui.createrailwaysnavigator.search_options.saved_routes.excluded": "%s wykluczonych", + "gui.createrailwaysnavigator.empty_list": "Lista jest pusta", + "gui.createrailwaysnavigator.new_entry.add": "Dodaj nowy wpis", + "gui.createrailwaysnavigator.new_entry.new": "Nowe:", + "gui.createrailwaysnavigator.saved_routes.saved": "%s zapisane", + "gui.createrailwaysnavigator.route_overview.notification.schedule_changed.title": "Rozkład został zmieniony!", + "gui.createrailwaysnavigator.route_overview.notification.schedule_changed": "Rozkład zapisanej trasy uległ zmianie. Sprawdź nawigator, aby je zobaczyć.", + "gui.createrailwaysnavigator.route_overview.transfers": "%s Przesiadki", + "gui.createrailwaysnavigator.route_overview.cancelled": "Odwołano", + "gui.createrailwaysnavigator.saved_routes.saved_route": "Zapisane trasy", + "block.createrailwaysnavigator.advanced_display.ber.arrival": "Czas przyjazdu", + "block.createrailwaysnavigator.advanced_display.ber.cancelled": "Odwołano", + "block.createrailwaysnavigator.advanced_display.ber.delayed": "Opóźnienie około %s minut", + "block.createrailwaysnavigator.advanced_display.ber.information_about_cancelled": "Informacje o %s: Ten pociąg został odwołany", + "block.createrailwaysnavigator.advanced_display.ber.information_about_delayed": "Informacje o %s: Opóźnienie około %s minut", + "block.createrailwaysnavigator.advanced_display.ber.cancelled2": ", został dzisiaj odwołany. Przepraszamy za niedogodności.", + "block.createrailwaysnavigator.advanced_display.ber.delayed2": ", dzisiaj około %s minut opóźnienia.", + "block.createrailwaysnavigator.advanced_display.ber.reason": "Powód: ", + "gui.createrailwaysnavigator.route_widget.show_details": "Pokaż szczegóły", + "gui.createrailwaysnavigator.route_widget.save": "Zapisz", + "gui.createrailwaysnavigator.route_widget.remove": "Usuń", + "gui.createrailwaysnavigator.route_widget.share": "Udostępnij...", + "gui.createrailwaysnavigator.saved_routes.in_the_past": "W przeszłości", + "gui.createrailwaysnavigator.saved_routes.today": "Dziś", + "gui.createrailwaysnavigator.saved_routes.tomorrow": "Jutro", + "gui.createrailwaysnavigator.saved_routes.in_days": "Za %s dni", + "gui.createrailwaysnavigator.saved_route_widget.show_details": "Pokaż szczegóły", + "gui.createrailwaysnavigator.saved_route_widget.share": "Udostępnij...", + "gui.createrailwaysnavigator.saved_route_widget.notifications": "Wyświetl powiadomienia", + "gui.createrailwaysnavigator.train_status.unknown_delay": "Opóźnienie w jeździe", + "gui.createrailwaysnavigator.train_status.delay_previous_journey": "Opóźnienie w poprzedniej podróży", + "gui.createrailwaysnavigator.train_status.red_signal": "Sygnał czerwony", + "gui.createrailwaysnavigator.train_status.priority_other_train": "Priorytet innego pociągu", + "gui.createrailwaysnavigator.train_status.delay_other_train": "Opóźnienie innego pociągu", + "gui.createrailwaysnavigator.train_status.track_closed": "Tor zamknięty", + "gui.createrailwaysnavigator.train_status.staff_shortage": "Niedobór pracowników", + "gui.createrailwaysnavigator.train_status.operational_disruption": "Zakłócenie w funkcjonowaniu pociągu", + "gui.createrailwaysnavigator.train_status.special_trip": "Podróż Specjalna", + "gui.createrailwaysnavigator.route_details.save_route.tooltip": "Zapisz trasę", + "gui.createrailwaysnavigator.route_details.remove_route.tooltip": "Usuń Przejazd", + "gui.createrailwaysnavigator.route_details.show_popup.tooltip": "Wyświetl wyskakujące okienko", + "gui.createrailwaysnavigator.navigator.my_profile": "Mój profil", + "gui.createrailwaysnavigator.navigator.train_initialization_warning": "Niektóre pociągi mogą jeszcze się nie pokazywać, bo ich rozkład jazdy nie został jeszcze obliczony.", + "gui.createrailwaysnavigator.global_settings.train_line.title": "Linie pociągowe", + "gui.createrailwaysnavigator.global_settings.train_line.color": "Wybierz kolor", + "gui.createrailwaysnavigator.global_settings.train_line.description": "Utwórz linię pociągową, aby zgrupować różne pociągi razem pod jedną nazwą i zmienić różne ustawienia. (Mogą tylko być ustawione w Rozkładzie Jazdy)" +} diff --git a/common/src/main/resources/assets/createrailwaysnavigator/lang/pt_br.json b/common/src/main/resources/assets/createrailwaysnavigator/lang/pt_br.json new file mode 100644 index 00000000..0605fbfb --- /dev/null +++ b/common/src/main/resources/assets/createrailwaysnavigator/lang/pt_br.json @@ -0,0 +1,315 @@ +{ + "advancement.createrailwaysnavigator.navigator": "Um viajante!", + "advancement.createrailwaysnavigator.navigator.description": "Fabrique um Navegador para buscar por conexões de trem de uma estação para a outra.", + "advancement.createrailwaysnavigator.advanced_display": "Não de última geração", + "advancement.createrailwaysnavigator.advanced_display.description": "Atualize suas placas de exibição e coloque-as em seu trem.", + "item.createrailwaysnavigator.navigator": "Create Railways Navigator", + "item.createrailwaysnavigator.navigator.tooltip.summary": "O _navegador_ exibe possíveis _conexões de trem_ com informações adicionais como _escalas_, _dados em tempo real_ e mais.", + "block.createrailwaysnavigator.train_station_clock": "Relógio de estação de trem", + "block.createrailwaysnavigator.advanced_display_block": "Bloco de exibição avançada", + "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "Use em _trens_, como _exibição de destino de trem_ ou _exibição de informação do passageiro_, ou em _estações de trem_ como _exibições de plataforma_ melhorada em que exibe mais informações do que placas de exibição regulares.", + "block.createrailwaysnavigator.advanced_display_block.tooltip.condition1": "Ao clicar com botão direito do mouse usando uma chave-inglesa", + "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "Abra o menu para _ajustar_ a _exibição_.", + "block.createrailwaysnavigator.advanced_display": "Placa de exibição avançada", + "block.createrailwaysnavigator.advanced_display.tooltip.summary": "Use em _trens_, como _exibição de destino de trem_ ou _exibição de informação do passageiro_, ou em _estações de trem_ como _exibições de plataforma_ melhorada em que exibe mais informações do que placas de exibição regulares.", + "block.createrailwaysnavigator.advanced_display.tooltip.condition1": "Ao clicar com botão direito do mouse usando uma chave-inglesa", + "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "Abra o menu para _ajustar_ a _exibição_.", + "block.createrailwaysnavigator.advanced_display_small": "Pequena exibição avançada", + "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "Use em _trens_, como _exibição de destino de trem_ ou _exibição de informação do passageiro_, ou em _estações de trem_ como _exibições de plataforma_ melhorada em que exibe mais informações do que placas de exibição regulares.", + "block.createrailwaysnavigator.advanced_display_small.tooltip.condition1": "Ao clicar com botão direito do mouse usando uma chave-inglesa", + "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "Abra o menu para _ajustar_ a _exibição_.", + "block.createrailwaysnavigator.advanced_display_panel": "Painel de exibição avançada", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "Use em _trens_, como _exibição de destino de trem_ ou _exibição de informação do passageiro_, ou em _estações de trem_ como _exibições de plataforma_ melhorada em que exibe mais informações do que placas de exibição regulares.", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.condition1": "Ao clicar com botão direito do mouse usando uma chave-inglesa", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "Abra o menu para _ajustar_ a _exibição_.", + "block.createrailwaysnavigator.advanced_display_half_panel": "Painel de exibição meio avançada", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "Use em _trens_, como _exibição de destino de trem_ ou _exibição de informação do passageiro_, ou em _estações de trem_ como _exibições de plataforma_ melhorada em que exibe mais informações do que placas de exibição regulares.", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.condition1": "Ao clicar com botão direito do mouse usando uma chave-inglesa", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "Abra o menu para _ajustar_ a _exibição_.", + "block.createrailwaysnavigator.advanced_display_sloped": "Exibição avançada inclinada", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "Use em _trens_, como _exibição de destino de trem_ ou _exibição de informação do passageiro_, ou em _estações de trem_ como _exibições de plataforma_ melhorada em que exibe mais informações do que placas de exibição regulares.", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.condition1": "Ao clicar com botão direito do mouse usando uma chave-inglesa", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "Abra o menu para _ajustar_ a _exibição_.", + "block.createrailwaysnavigator.advanced_display_slab": "Laje de exibição avançada", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.summary": "Use em _trens_, como _exibição de destino de trem_ ou _exibição de informação do passageiro_, ou em _estações de trem_ como _exibições de plataforma_ melhorada em que exibe mais informações do que placas de exibição regulares.", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.condition1": "Ao clicar com botão direito do mouse usando uma chave-inglesa", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.behaviour1": "Abra o menu para _ajustar_ a _exibição_.", + "block.createrailwaysnavigator.advanced_display.ber.not_in_service": "Fora de serviço!", + "category.createrailwaysnavigator.crn": "Create Railways Navigator", + "key.createrailwaysnavigator.route_overlay_options": "Mostrar opções de sobreposição de rota", + "enum.createrailwaysnavigator.overlay_position": "Posição da exibição", + "enum.createrailwaysnavigator.overlay_position.info.top_left": "Canto superior esquerdo", + "enum.createrailwaysnavigator.overlay_position.info.top_right": "Canto superior direito", + "enum.createrailwaysnavigator.overlay_position.info.bottom_left": "Canto inferior esquerdo", + "enum.createrailwaysnavigator.overlay_position.info.bottom_right": "Canto inferior direito", + "gui.createrailwaysnavigator.loading.title": "Baixando dados do servidor...", + "gui.createrailwaysnavigator.overlay_settings.title": "Opções de sobreposição da rota", + "gui.createrailwaysnavigator.route_overlay_settings.show_details": "Exibir detalhes", + "gui.createrailwaysnavigator.route_overlay_settings.unpin": "Remover sobreposição da rota", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.on": "Anunciados do narrador ativado.", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.off": "Anunciados do narrador desativado.", + "gui.createrailwaysnavigator.route_overlay_settings.notifications.on": "Notificações ativadas", + "gui.createrailwaysnavigator.route_overlay_settings.notifications.off": "Notificações desativadas", + "gui.createrailwaysnavigator.route_overlay_settings.scale": "Escala da interface", + "gui.createrailwaysnavigator.route_overlay_settings.narrator": "Anunciados do narrador", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.description": "O narrador anuncia eventos importantes na sua jornada, p. e.x. a próxima parada, alterações, etc.", + "gui.createrailwaysnavigator.route_overlay_settings.notifications": "Notificações", + "gui.createrailwaysnavigator.route_overlay_settings.notifications.description": "Obtenha notificações quentinhas sobre eventos importantes na sua jornada, p. e.x. a próxima parada, alterações, etc.", + "gui.createrailwaysnavigator.common.expand": "Exibir detalhes", + "gui.createrailwaysnavigator.common.collapse": "Ocultar detalhes", + "gui.createrailwaysnavigator.common.go_back": "Voltar", + "gui.createrailwaysnavigator.common.go_to_top": "Voltar ao topo", + "gui.createrailwaysnavigator.common.reset_defaults": "Redefinir ao padrão", + "gui.createrailwaysnavigator.common.count": "Contar", + "gui.createrailwaysnavigator.common.true": "Sim", + "gui.createrailwaysnavigator.common.false": "Não", + "gui.createrailwaysnavigator.common.search": "Buscar", + "gui.createrailwaysnavigator.common.auto": "Automático", + "gui.createrailwaysnavigator.common.server_error": "Erro do servidor ao executar tarefa. Confira o console para mais detalhes.", + "gui.createrailwaysnavigator.common.delete": "Excluir", + "gui.createrailwaysnavigator.common.add": "Adicionar", + "gui.createrailwaysnavigator.common.help": "Obter ajuda", + "gui.createrailwaysnavigator.navigator.title": "Create Railways Navigator", + "gui.createrailwaysnavigator.navigator.no_connections": "Nenhuma conexão encontrada.", + "gui.createrailwaysnavigator.navigator.not_searched": "Nada buscado ainda.", + "gui.createrailwaysnavigator.navigator.searching": "Procurando por conexões...", + "gui.createrailwaysnavigator.navigator.error_title": "Não foi possível navegar!", + "gui.createrailwaysnavigator.navigator.start_end_null": "Iniciar ou o destino está vazio.", + "gui.createrailwaysnavigator.navigator.start_end_equal": "Iniciar e o destino são iguais.", + "gui.createrailwaysnavigator.navigator.route_entry.connection_in_past": "❌ Conexões com o passado", + "gui.createrailwaysnavigator.navigator.route_entry.transfer": "Transferir", + "gui.createrailwaysnavigator.navigator.route_entry.station_start": "de %s", + "gui.createrailwaysnavigator.navigator.global_settings.tooltip": "Opções globais", + "gui.createrailwaysnavigator.navigator.search_settings.tooltip": "Opções de busca", + "gui.createrailwaysnavigator.navigator.search.tooltip": "Buscar", + "gui.createrailwaysnavigator.navigator.location.tooltip": "A estação mais próxima da posição atual", + "gui.createrailwaysnavigator.navigator.refresh.tooltip": "Atualizar", + "gui.createrailwaysnavigator.navigator.switch.tooltip": "Alterar campos", + "gui.createrailwaysnavigator.route_details.title": "Detalhes da rota", + "gui.createrailwaysnavigator.route_details.departure": "Partida em", + "gui.createrailwaysnavigator.route_details.next_transfer_time": "Transferir em", + "gui.createrailwaysnavigator.route_details.transfer": "Transferir", + "gui.createrailwaysnavigator.route_overview.title": "Empresa de viagem", + "gui.createrailwaysnavigator.route_overview.journey_begins": "Sua jornada inicia! %s para %s, partida %s", + "gui.createrailwaysnavigator.route_overview.journey_begins_with_platform": "Sua jornada inicia! %s para %s, partida %s na plataforma %s", + "gui.createrailwaysnavigator.route_overview.train_details": "%s para %s", + "gui.createrailwaysnavigator.route_overview.next_stop": "Próxima parada: %s", + "gui.createrailwaysnavigator.route_overview.transfer": "Alterar para %s → %s", + "gui.createrailwaysnavigator.route_overview.transfer_with_platform": "Alterar para %s → %s na plataforma %s", + "gui.createrailwaysnavigator.route_overview.journey_completed": "Jornada concluída", + "gui.createrailwaysnavigator.route_overview.after_journey": "Você alcançou %s. Obrigada por viajar e tenha um ótimo dia.", + "gui.createrailwaysnavigator.route_overview.next_connections": "Próximas conexões", + "gui.createrailwaysnavigator.route_overview.schedule_transfer": "Transferir", + "gui.createrailwaysnavigator.route_overview.train_cancelled": "Trem cancelado", + "gui.createrailwaysnavigator.route_overview.train_cancellation_info": "Informação sobre %s", + "gui.createrailwaysnavigator.route_overview.stop_cancelled": "❌ Cancelado", + "gui.createrailwaysnavigator.route_overview.connection_endangered": "Conexão ameaçada", + "gui.createrailwaysnavigator.route_overview.connection_missed": "Conexão perdida", + "gui.createrailwaysnavigator.route_overview.connection_cancelled": "Trem cancelado", + "gui.createrailwaysnavigator.route_overview.journey_interrupted": "Sua jornada à %s não pôde ser continuada.", + "gui.createrailwaysnavigator.route_overview.connection_missed_info": "Devido ao atraso no trem, você perdeu sua ligação ao trem. Busque por uma alternativa no navegador. Perdão pela inconveniência.", + "gui.createrailwaysnavigator.route_overview.train_cancelled_info": "Informações sobre %s: Este trem foi cancelado hoje! Perdão pela inconveniência. Busque por uma alternativa no navegador.", + "gui.createrailwaysnavigator.route_overview.train_cancelled_title": "O trem foi cancelado", + "gui.createrailwaysnavigator.route_overview.journey_interrupted_info": "Sua jornada à %s não pôde ser continuada. Busque por uma alternativa no navegador.", + "gui.createrailwaysnavigator.route_overview.options": "Pressione %s para opções.", + "gui.createrailwaysnavigator.route_overview.notification.journey_begins.title": "Sua jornada à %s se inicia!", + "gui.createrailwaysnavigator.route_overview.notification.journey_begins": "%s para %s, partida %s", + "gui.createrailwaysnavigator.route_overview.notification.journey_begins_with_platform": "%s para %s, partida %s da plataforma %s", + "gui.createrailwaysnavigator.route_overview.notification.platform_changed.title": "Sua plataforma mudou!", + "gui.createrailwaysnavigator.route_overview.notification.platform_changed": "Seu trem em %s sai da plataforma %s hoje.", + "gui.createrailwaysnavigator.route_overview.notification.train_delayed.title": "%s: Chegada %s atrasada.", + "gui.createrailwaysnavigator.route_overview.notification.train_delayed": "%s ao invés de %s em %s", + "gui.createrailwaysnavigator.route_overview.notification.train_cancelled.title": "%s: Trem cancelado", + "gui.createrailwaysnavigator.route_overview.notification.train_cancelled": "%s para %s foi cancelado hoje.", + "gui.createrailwaysnavigator.route_overview.notification.transfer.title": "A transferência está vindo", + "gui.createrailwaysnavigator.route_overview.notification.transfer": "Alterar para %s → %s", + "gui.createrailwaysnavigator.route_overview.notification.transfer_with_platform": "Alterar para %s → %s na plataforma %s", + "gui.createrailwaysnavigator.route_overview.notification.connection_endangered.title": "Sua conexão está em perigo!", + "gui.createrailwaysnavigator.route_overview.notification.connection_endangered": "Você provavelmente não poderá chegar a %s para %s.", + "gui.createrailwaysnavigator.route_overview.notification.connection_missed.title": "Conexão perdida", + "gui.createrailwaysnavigator.route_overview.notification.connection_missed": "Você perdeu seu trem de conexão de %s para %s.", + "gui.createrailwaysnavigator.route_overview.notification.journey_completed.title": "Você chegou ao seu destino!", + "gui.createrailwaysnavigator.route_overview.notification.journey_completed": "Obrigada por viajar e tenha um ótimo dia", + "gui.createrailwaysnavigator.route_overview.date": "Dia %s, %s", + "gui.createrailwaysnavigator.global_settings.title": "Opções globais", + "gui.createrailwaysnavigator.global_settings.option.tooltip": "Clique para editar", + "gui.createrailwaysnavigator.global_settings.option_alias.title": "Marcações de estação de trem", + "gui.createrailwaysnavigator.global_settings.option_alias.description": "Combine estações de trem individuais em uma estação multi-plataforma com um nome próprio para que o navegador possa sugerir transferências e mais.", + "gui.createrailwaysnavigator.global_settings.option_blacklist.title": "Lista negra de estações de trem", + "gui.createrailwaysnavigator.global_settings.option_blacklist.description": "Exclua estações de trem que não devem aparecer nos resultados da navegação. Estas estações serão ignoradas ao gerar rotas.", + "gui.createrailwaysnavigator.global_settings.train_group.title": "Grupos de trem", + "gui.createrailwaysnavigator.global_settings.train_group.description": "Crie grupos de trem para organizar todos os trens (p. e.x.: serviços regionais, serviços de longa distância, ...) Os usuários podem decidir quais grupos eles querem usar.", + "gui.createrailwaysnavigator.global_settings.train_blacklist.title": "Lista negra de trens", + "gui.createrailwaysnavigator.global_settings.train_blacklist.description": "Exclui trens, p. e.x.: trens de carga, ou especiais, etc., para que eles não sejam usados nas sugestões de rota.", + "gui.createrailwaysnavigator.station_tags.summary": "Contém %s estações de trem", + "gui.createrailwaysnavigator.station_tags.editor": "Última edição por %s em %s", + "gui.createrailwaysnavigator.station_tags.add.tooltip": "Criar entrada", + "gui.createrailwaysnavigator.station_tags.delete_alias.tooltip": "Excluir marcação", + "gui.createrailwaysnavigator.station_tags.delete_station.tooltip": "Remover estação", + "gui.createrailwaysnavigator.station_tags.modify_platform.tooltip": "Clique para mudar", + "gui.createrailwaysnavigator.station_tags.add_station.tooltip": "Adicionar estação", + "gui.createrailwaysnavigator.station_tags.hint.station_name": "Nome da estação de trem", + "gui.createrailwaysnavigator.station_tags.hint.platform": "Rótulo de plataforma", + "gui.createrailwaysnavigator.station_tags.enter_name": "Insira o nome aqui", + "gui.createrailwaysnavigator.train_group_settings.title": "Opções de grupo de trens", + "gui.createrailwaysnavigator.train_group_settings.summary": "Contém %s trens", + "gui.createrailwaysnavigator.train_group_settings.editor": "Última edição por %s em %s", + "gui.createrailwaysnavigator.train_group_settings.delete_alias.tooltip": "Excluir grupo", + "gui.createrailwaysnavigator.train_group_settings.delete_station.tooltip": "Remover trem", + "gui.createrailwaysnavigator.train_group_settings.add_station.tooltip": "Adicionar trem", + "gui.createrailwaysnavigator.blacklist.title": "Lista negra de estações de trem", + "gui.createrailwaysnavigator.blacklist.add.tooltip": "Adicionar à lista negra", + "gui.createrailwaysnavigator.blacklist.delete.tooltip": "Remover da lista negra", + "gui.createrailwaysnavigator.train_blacklist.title": "Lista negra de trens", + "gui.createrailwaysnavigator.train_blacklist.add.tooltip": "Adicionar à lista negra", + "gui.createrailwaysnavigator.train_blacklist.delete.tooltip": "Remover da lista negra", + "gui.createrailwaysnavigator.search_settings.title": "Opções de busca", + "gui.createrailwaysnavigator.search_settings.transfer_time": "Tempo mínimo de transferência", + "gui.createrailwaysnavigator.search_settings.transfer_time.description": "O tempo mínimo que deve estar disponível para mudar de trem. (1h ~ 50 segundos)", + "gui.createrailwaysnavigator.search_settings.train_groups": "Filtro de categoria de trem", + "gui.createrailwaysnavigator.search_settings.train_groups.description": "Decide que trens de quais categorias de trem você queira usar.", + "gui.createrailwaysnavigator.search_settings.train_groups.overview": "%s categorias selecionadas", + "gui.createrailwaysnavigator.search_settings.train_groups.overview.all": "Tudo", + "gui.createrailwaysnavigator.search_settings.train_groups.overview.none": "Não", + "gui.createrailwaysnavigator.search_settings.train_groups.tooltip.reset": "Redefinir filtro", + "gui.createrailwaysnavigator.new_text_entry.add.tooltip": "Adicionar", + "gui.createrailwaysnavigator.time": "Tempo: %s", + "gui.createrailwaysnavigator.time.now": "agora", + "gui.createrailwaysnavigator.time_format.dhm": "%s dias %s hrs. %s min.", + "gui.createrailwaysnavigator.time_format.hm": "%s hrs. %s min.", + "gui.createrailwaysnavigator.time_format.m": "%s min.", + "gui.createrailwaysnavigator.platform": "Plataforma", + "gui.createrailwaysnavigator.departure": "Partida", + "gui.createrailwaysnavigator.destination": "Destino", + "gui.createrailwaysnavigator.line": "Linha", + "gui.createrailwaysnavigator.following_trains": "Seguintes trens:", + "gui.createrailwaysnavigator.via": "através", + "gui.createrailwaysnavigator.advanced_display_settings.title": "Opções de exibição avançada", + "gui.createrailwaysnavigator.advanced_display_settings.display_type": "Tipo de exibição", + "gui.createrailwaysnavigator.advanced_display_settings.display_type.description": "Determina as informações exibidas.", + "gui.createrailwaysnavigator.advanced_display_settings.info_type": "Tipo de informação", + "gui.createrailwaysnavigator.advanced_display_settings.info_type.description": "Determina o quão detalhadas são as informações.", + "gui.createrailwaysnavigator.advanced_display_settings.double_sided": "Dois lados", + "enum.createrailwaysnavigator.display_info_type": "Tipo de exibição de informações", + "enum.createrailwaysnavigator.display_info_type.description": "Determina quantas informações devem ser exibidas no seu quadro de exibição.", + "enum.createrailwaysnavigator.display_info_type.simple": "Simples", + "enum.createrailwaysnavigator.display_info_type.info.simple": "A exibição só mostrará informações mais importantes sem detalhes adicionais.", + "enum.createrailwaysnavigator.display_info_type.detailed": "Detalhado", + "enum.createrailwaysnavigator.display_info_type.info.detailed": "As informações mais importantes com alguns detalhes serão exibidos, como a velocidade do trem, escalas, etc.", + "enum.createrailwaysnavigator.display_info_type.informative": "Informativo", + "enum.createrailwaysnavigator.display_info_type.info.informative": "Exibe todas as informações que podem ser interessante e exibe-os numa interface chique. Não recomendado para pequenas exibições porque o texto talvez fique bastante pequeno.", + "enum.createrailwaysnavigator.display_type": "Tipo de exibição", + "enum.createrailwaysnavigator.display_type.description": "O tipo de sua exibição que depende na sua finalidade.", + "enum.createrailwaysnavigator.display_type.train_destination": "Destino do trem", + "enum.createrailwaysnavigator.display_type.info.train_destination": "Pretendido ser usado fora de trens já que ele exibe as informações sobre o trem como o nome, destino e (se selecionado) escalas e outras informações.", + "enum.createrailwaysnavigator.display_type.passenger_information": "Informações do passageiro", + "enum.createrailwaysnavigator.display_type.info.passenger_information": "Representa as exibições encontradas nos trens. Estas exibições apareceram na próxima parada, a direção da saída e (se selecionado) a velocidade do trem e uma visão geral da rota.", + "enum.createrailwaysnavigator.display_type.platform": "Exibição da plataforma", + "enum.createrailwaysnavigator.display_type.info.platform": "Estas exibições podem ser usadas em plataforma de estações de trem e exibe os trens seguintes com detalhes adicionais se selecionado. Não pode ser usado em trens!", + "enum.createrailwaysnavigator.side": "Lateral", + "enum.createrailwaysnavigator.side.description": "A lateral do bloco onde a informação será renderizada.", + "enum.createrailwaysnavigator.side.front": "Parte frontal", + "enum.createrailwaysnavigator.side.info.front": "As informações serão renderizadas no lado frontal. Este é o comportamento padrão.", + "enum.createrailwaysnavigator.side.both": "Ambos os lados", + "enum.createrailwaysnavigator.side.info.both": "As informações serão renderizadas nos dois lados.", + "enum.createrailwaysnavigator.time_display": "Exibição de hora", + "enum.createrailwaysnavigator.time_display.description": "Determina como a hora deve ser exibida.", + "enum.createrailwaysnavigator.time_display.abs": "ABS", + "enum.createrailwaysnavigator.time_display.info.abs": "ABS (absoluto)", + "enum.createrailwaysnavigator.time_display.eta": "ETA", + "enum.createrailwaysnavigator.time_display.info.eta": "ETA (hora estimada de chegada)", + "create.display_source.advanced_display": "Exibições avançadas", + "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width": "Largura da coluna do nome do trem", + "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description": "em píxeis de blocos. (Padrão: 16)", + "gui.createrailwaysnavigator.display_source.advanced_display.platform_width": "Largura da coluna da plataforma", + "gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description": "em píxeis de blocos. (Padrão: automático)", + "gui.createrailwaysnavigator.section_settings.title": "Opções de seção", + "gui.createrailwaysnavigator.section_settings.train_groups": "Grupo de atribuição de trem", + "gui.createrailwaysnavigator.section_settings.train_lines": "Linha de atribuição de trem", + "gui.createrailwaysnavigator.section_settings.include_previous_station": "Incluir início da próxima seção", + "gui.createrailwaysnavigator.section_settings.usable": "Navegável", + "gui.createrailwaysnavigator.section_settings.none": "(Nenhum)", + "createrailwaysnavigator.schedule.condition.dynamic_delay": "Atraso dinâmico", + "createrailwaysnavigator.schedule.condition.dynamic_delay.min_duration": "Duração mínima", + "createrailwaysnavigator.schedule.condition.dynamic_delay.title": "Espera: %s..%s", + "createrailwaysnavigator.schedule.condition.dynamic_delay.at_least": "ou no mínimo %s", + "createrailwaysnavigator.schedule.instruction.travel_section": "Nova seção de agendamentos", + "createrailwaysnavigator.schedule.instruction.travel_section.description": "O começo de uma nova seção de agendamentos.", + "createrailwaysnavigator.schedule.instruction.travel_section.configure": "Ajustar...", + "createrailwaysnavigator.schedule.instruction.travel_section.train_group": " - Definir grupo de trem: ", + "createrailwaysnavigator.schedule.instruction.travel_section.train_line": " - Definir linha de trem: ", + "createrailwaysnavigator.schedule.instruction.travel_section.include_previous_station": " - Incluir início da próxima seção: ", + "createrailwaysnavigator.schedule.instruction.travel_section.usable": " - Navegável: ", + "createrailwaysnavigator.schedule.instruction.reset_timings": "Redefinir horários", + "display.createrailwaysnavigator.train_destination.simple": "Compacto", + "display.createrailwaysnavigator.train_destination.extended": "Estendido", + "display.createrailwaysnavigator.train_destination.detailed": "Detalhado", + "display.createrailwaysnavigator.passenger_information.running_text": "Texto rolante", + "display.createrailwaysnavigator.passenger_information.detailed_with_schedule": "Detalhado com agendamento", + "display.createrailwaysnavigator.platform.running_text": "Texto rolante", + "display.createrailwaysnavigator.platform.table": "Tabela", + "display.createrailwaysnavigator.platform.focus": "Foco", + "gui.createrailwaysnavigator.saved_routes.title": "Rotas salvas", + "gui.createrailwaysnavigator.schedule_board.title": "Quadro de agendamentos", + "gui.createrailwaysnavigator.station_tags.title": "Etiquetas de trens", + "gui.createrailwaysnavigator.journey_info.title": "Informações da jornada", + "gui.createrailwaysnavigator.journey_info.date": "Dia %s", + "gui.createrailwaysnavigator.journey_info.train": "%s (%s) a %s", + "gui.createrailwaysnavigator.color_picker.custom": "Personalizado...", + "gui.createrailwaysnavigator.color_picker.no_color": "Sem cor", + "gui.createrailwaysnavigator.schedule_board.view_details": "Ver detalhes", + "gui.createrailwaysnavigator.schedule_board.train_from": "de %s", + "gui.createrailwaysnavigator.search_options.departure_in": "Partida em", + "gui.createrailwaysnavigator.search_options.train_groups": "Grupos de trem", + "gui.createrailwaysnavigator.search_options.transfer_time": "Tempo de transferência", + "gui.createrailwaysnavigator.search_options.advanced_options": "Opções avançadas", + "gui.createrailwaysnavigator.search_options.train_groups.all": "Todos", + "gui.createrailwaysnavigator.search_options.train_groups.excluded": "%s excluído", + "gui.createrailwaysnavigator.search_options.saved_routes.all": "Todas", + "gui.createrailwaysnavigator.search_options.saved_routes.excluded": "%s excluído", + "gui.createrailwaysnavigator.empty_list": "A lista está vazia", + "gui.createrailwaysnavigator.new_entry.add": "Adicionar entrada", + "gui.createrailwaysnavigator.new_entry.new": "Nova:", + "gui.createrailwaysnavigator.saved_routes.saved": "%s salva", + "gui.createrailwaysnavigator.route_overview.notification.schedule_changed.title": "O agendamento mudou!", + "gui.createrailwaysnavigator.route_overview.notification.schedule_changed": "O agendamento da rota salva mudou. Verifique o navegador para ver estas mudanças.", + "gui.createrailwaysnavigator.route_overview.transfers": "%s transferências", + "gui.createrailwaysnavigator.route_overview.cancelled": "Cancelada", + "gui.createrailwaysnavigator.saved_routes.saved_route": "Rota salva", + "block.createrailwaysnavigator.advanced_display.ber.arrival": "Chegada", + "block.createrailwaysnavigator.advanced_display.ber.cancelled": "Cancelada", + "block.createrailwaysnavigator.advanced_display.ber.delayed": "Atraso de aprox. %s minutos", + "block.createrailwaysnavigator.advanced_display.ber.information_about_cancelled": "Informações sobre %s: Este trem foi cancelado", + "block.createrailwaysnavigator.advanced_display.ber.information_about_delayed": "Informações sobre %s: Atraso de aprox. %s minutos", + "block.createrailwaysnavigator.advanced_display.ber.cancelled2": ", está cancelado hoje. Perdão pela inconveniência.", + "block.createrailwaysnavigator.advanced_display.ber.delayed2": ", hoje aprox. %s minutos atrasados.", + "block.createrailwaysnavigator.advanced_display.ber.reason": "Causa: ", + "gui.createrailwaysnavigator.route_widget.show_details": "Exibir detalhes", + "gui.createrailwaysnavigator.route_widget.save": "Salvar", + "gui.createrailwaysnavigator.route_widget.remove": "Remover", + "gui.createrailwaysnavigator.route_widget.share": "Compartilhar...", + "gui.createrailwaysnavigator.saved_routes.in_the_past": "No passado", + "gui.createrailwaysnavigator.saved_routes.today": "Hoje", + "gui.createrailwaysnavigator.saved_routes.tomorrow": "Amanhã", + "gui.createrailwaysnavigator.saved_routes.in_days": "Em %s dias", + "gui.createrailwaysnavigator.saved_route_widget.show_details": "Exibir detalhes", + "gui.createrailwaysnavigator.saved_route_widget.share": "Compartilhar...", + "gui.createrailwaysnavigator.saved_route_widget.notifications": "Exibir notificações", + "gui.createrailwaysnavigator.train_status.unknown_delay": "Atraso nas operações", + "gui.createrailwaysnavigator.train_status.delay_previous_journey": "Atraso na jornada anterior", + "gui.createrailwaysnavigator.train_status.red_signal": "Sinal vermelho", + "gui.createrailwaysnavigator.train_status.priority_other_train": "Prioridade de outro trem", + "gui.createrailwaysnavigator.train_status.delay_other_train": "Atraso de outro trem", + "gui.createrailwaysnavigator.train_status.track_closed": "Trilha fechada", + "gui.createrailwaysnavigator.train_status.staff_shortage": "Falta de funcionários", + "gui.createrailwaysnavigator.train_status.operational_disruption": "Interrupção operacional", + "gui.createrailwaysnavigator.train_status.special_trip": "Viagem especial", + "gui.createrailwaysnavigator.route_details.save_route.tooltip": "Salvar rota", + "gui.createrailwaysnavigator.route_details.remove_route.tooltip": "Remover rota", + "gui.createrailwaysnavigator.route_details.show_popup.tooltip": "Exibir pop-up", + "gui.createrailwaysnavigator.navigator.my_profile": "Meu perfil", + "gui.createrailwaysnavigator.navigator.train_initialization_warning": "Algumas rotas podem estar incompletas ou nem sugeridas devido ao Create Railways Navigator não ter iniciado os trens ainda.", + "gui.createrailwaysnavigator.global_settings.train_line.title": "Linhas do trem", + "gui.createrailwaysnavigator.global_settings.train_line.color": "Selecionar cor", + "gui.createrailwaysnavigator.global_settings.train_line.description": "Crie linhas de trem para agrupar trens diferentes, substitua o nome de exibição e ajuste outras opções para cada linha. (Só pode ser atribuído aos trens no agendamento)" +} diff --git a/common/src/main/resources/assets/createrailwaysnavigator/lang/pt_pt.json b/common/src/main/resources/assets/createrailwaysnavigator/lang/pt_pt.json index 928591c4..b7d5075f 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/lang/pt_pt.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/lang/pt_pt.json @@ -1,59 +1,49 @@ { "advancement.createrailwaysnavigator.navigator": "Obrigado por viajar", - "advancement.createrailwaysnavigator.navigator.description": "Crie um navegador para procurar ligações ferroviárias de uma estação ferroviária para outra.", + "advancement.createrailwaysnavigator.navigator.description": "Crie um navegador para procurar ligações ferroviárias de uma estação ferroviária para outra.", "advancement.createrailwaysnavigator.advanced_display": "Não é bem 4k", "advancement.createrailwaysnavigator.advanced_display.description": "Atualize as suas placas de exibição para exibir mais informações e até mesmo colocá-las nos seus comboios.", - - "itemGroup.createrailwaysnavigator.tab": "Criar Navegador Ferroviário", - "item.createrailwaysnavigator.navigator": "Criar Navegador Ferroviário", - "item.createrailwaysnavigator.navigator.tooltip.summary": "O _navegador_ mostra possíveis _ligações de comboios_ com informações adicionais, como _escalas_, data_ em tempo _real e muito mais.", - + "item.createrailwaysnavigator.navigator.tooltip.summary": "O _navegador_ mostra possíveis _ligações de comboios_ com informações adicionais, como _escalas_, data_ em tempo _real e muito mais.", "block.createrailwaysnavigator.train_station_clock": "Relógio da Estação de Comboios", "block.createrailwaysnavigator.advanced_display_block": "Bloco de exibição avançada", - "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "Use-o em _comboios_, como um ecrã_ de destino _comboio ou _passageiro informações ecrã_, ou em _estações de comboios_ como _ecrãs de plataformas_ melhorado que também mostra mais informações do que placas de exibição regulares.", + "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "Use-o em _comboios_, como um ecrã_ de destino _comboio ou _passageiro informações ecrã_, ou em _estações de comboios_ como _ecrãs de plataformas_ melhorado que também mostra mais informações do que placas de exibição regulares.", "block.createrailwaysnavigator.advanced_display_block.tooltip.condition1": "Quando lado direito do rato é clicado usando uma chave inglesa", - "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "Abra um menu para _configurar_ o _ecrã_.", + "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "Abra um menu para _configurar_ o _ecrã_.", "block.createrailwaysnavigator.advanced_display": "Placa de exibição avançada", - "block.createrailwaysnavigator.advanced_display.tooltip.summary": "Use-o em _comboios_, como um ecrã_ de destino _comboio ou _passageiro informações ecrã_, ou em _estações de comboios_ como _ecrãs de plataformas_ melhorado que também mostra mais informações do que placas de exibição regulares.", + "block.createrailwaysnavigator.advanced_display.tooltip.summary": "Use-o em _comboios_, como um ecrã_ de destino _comboio ou _passageiro informações ecrã_, ou em _estações de comboios_ como _ecrãs de plataformas_ melhorado que também mostra mais informações do que placas de exibição regulares.", "block.createrailwaysnavigator.advanced_display.tooltip.condition1": "Quando lado direito do rato é clicado usando uma chave inglesa", - "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "Abra um menu para _configurar_ o _ecrã_.", + "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "Abra um menu para _configurar_ o _ecrã_.", "block.createrailwaysnavigator.advanced_display_small": "Ecrã de exibição pequena avançada", - "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "Use-o em _comboios_, como um ecrã_ de destino _comboio ou _passageiro informações ecrã_, ou em _estações de comboios_ como _ecrãs de plataformas_ melhorado que também mostra mais informações do que placas de exibição regulares.", + "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "Use-o em _comboios_, como um ecrã_ de destino _comboio ou _passageiro informações ecrã_, ou em _estações de comboios_ como _ecrãs de plataformas_ melhorado que também mostra mais informações do que placas de exibição regulares.", "block.createrailwaysnavigator.advanced_display_small.tooltip.condition1": "Quando lado direito do rato é clicado usando uma chave inglesa", - "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "Abra um menu para _configurar_ o _ecrã_.", + "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "Abra um menu para _configurar_ o _ecrã_.", "block.createrailwaysnavigator.advanced_display_panel": "Painel de exibição avançada", - "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "Use-o em _comboios_, como um ecrã_ de destino _comboio ou _passageiro informações ecrã_, ou em _estações de comboios_ como _ecrãs de plataformas_ melhorado que também mostra mais informações do que placas de exibição regulares.", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "Use-o em _comboios_, como um ecrã_ de destino _comboio ou _passageiro informações ecrã_, ou em _estações de comboios_ como _ecrãs de plataformas_ melhorado que também mostra mais informações do que placas de exibição regulares.", "block.createrailwaysnavigator.advanced_display_panel.tooltip.condition1": "Quando lado direito do rato é clicado usando uma chave inglesa", - "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "Abra um menu para _configurar_ o _ecrã_.", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "Abra um menu para _configurar_ o _ecrã_.", "block.createrailwaysnavigator.advanced_display_half_panel": "Painel de exibição meio avançado", - "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "Use-o em _comboios_, como um ecrã_ de destino _comboio ou _passageiro informações ecrã_, ou em _estações de comboios_ como _ecrãs de plataformas_ melhorado que também mostra mais informações do que placas de exibição regulares.", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "Use-o em _comboios_, como um ecrã_ de destino _comboio ou _passageiro informações ecrã_, ou em _estações de comboios_ como _ecrãs de plataformas_ melhorado que também mostra mais informações do que placas de exibição regulares.", "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.condition1": "Quando lado direito do rato é clicado usando uma chave inglesa", - "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "Abra um menu para _configurar_ o _ecrã_.", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "Abra um menu para _configurar_ o _ecrã_.", "block.createrailwaysnavigator.advanced_display_sloped": "Ecrã avançado inclinado", - "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "Use-o em _comboios_, como um ecrã_ de destino _comboio ou _passageiro informações ecrã_, ou em _estações de comboios_ como _ecrãs de plataformas_ melhorado que também mostra mais informações do que placas de exibição regulares.", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "Use-o em _comboios_, como um ecrã_ de destino _comboio ou _passageiro informações ecrã_, ou em _estações de comboios_ como _ecrãs de plataformas_ melhorado que também mostra mais informações do que placas de exibição regulares.", "block.createrailwaysnavigator.advanced_display_sloped.tooltip.condition1": "Quando lado direito do rato é clicado usando uma chave inglesa", - "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "Abra um menu para _configurar_ o _ecrã_.", - + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "Abra um menu para _configurar_ o _ecrã_.", "block.createrailwaysnavigator.advanced_display.ber.not_in_service": "Fora de Serviço!", - "block.createrailwaysnavigator.advanced_display.ber.shunting_trip": "Viagem sem passageiros", - "category.createrailwaysnavigator.crn": "Criar Navegador Ferroviário", "key.createrailwaysnavigator.route_overlay_options": "Mostrar opções de sobreposição de rota", - "enum.createrailwaysnavigator.overlay_position": "Posição do ecrã", "enum.createrailwaysnavigator.overlay_position.info.top_left": "Canto superior esquerdo", "enum.createrailwaysnavigator.overlay_position.info.top_right": "Canto superior direito", "enum.createrailwaysnavigator.overlay_position.info.bottom_left": "Canto inferior esquerdo", "enum.createrailwaysnavigator.overlay_position.info.bottom_right": "Canto inferior direito", - "gui.createrailwaysnavigator.loading.title": "Baixando dados do servidor...", - "gui.createrailwaysnavigator.overlay_settings.title": "Configurações de sobreposição de rota", "gui.createrailwaysnavigator.route_overlay_settings.show_details": "Mostrar detalhes", "gui.createrailwaysnavigator.route_overlay_settings.unpin": "Remover sobreposicao de rota", "gui.createrailwaysnavigator.route_overlay_settings.narrator.on": "Anuncios do Narrador ativados.", - "gui.createrailwaysnavigator.route_overlay_settings.narrator.off": "Anuncios do Narrador desativados.", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.off": "Anuncios do Narrador desativados.", "gui.createrailwaysnavigator.route_overlay_settings.notifications.on": "Notificações ativadas", "gui.createrailwaysnavigator.route_overlay_settings.notifications.off": "Notificações desativadas", "gui.createrailwaysnavigator.route_overlay_settings.scale": "Escala GUI", @@ -61,7 +51,6 @@ "gui.createrailwaysnavigator.route_overlay_settings.narrator.description": "O Narrador anuncia eventos importantes em sua jornada, por exemplo, a proxima parada, mudancas, etc.", "gui.createrailwaysnavigator.route_overlay_settings.notifications": "Notificações", "gui.createrailwaysnavigator.route_overlay_settings.notifications.description": "Receba notificacoes do sistema sobre eventos importantes em sua jornada, por exemplo, a proxima parada, alteracoes, etc.", - "gui.createrailwaysnavigator.common.expand": "Mostrar detalhes", "gui.createrailwaysnavigator.common.collapse": "Ocultar detalhes", "gui.createrailwaysnavigator.common.go_back": "Voltar", @@ -73,8 +62,6 @@ "gui.createrailwaysnavigator.common.search": "Procurar", "gui.createrailwaysnavigator.common.auto": "Automático", "gui.createrailwaysnavigator.common.server_error": "Erro do servidor durante a execucao da tarefa. Procure detalhes no console.", - - "gui.createrailwaysnavigator.navigator.title": "Create Railways Navigator", "gui.createrailwaysnavigator.navigator.no_connections": "Nenhuma conexao encontrada.", "gui.createrailwaysnavigator.navigator.not_searched": "Nada pesquisado ainda.", "gui.createrailwaysnavigator.navigator.searching": "Procurar conexões ...", @@ -82,20 +69,16 @@ "gui.createrailwaysnavigator.navigator.start_end_null": "O início ou o destino estao vazios.", "gui.createrailwaysnavigator.navigator.start_end_equal": "Início e destino sao iguais.", "gui.createrailwaysnavigator.navigator.route_entry.connection_in_past": "❌ Conexão no passado", - "gui.createrailwaysnavigator.navigator.route_entry.transfer": "Trans.", "gui.createrailwaysnavigator.navigator.route_entry.station_start": "de %s", "gui.createrailwaysnavigator.navigator.global_settings.tooltip": "Configurações globais", "gui.createrailwaysnavigator.navigator.search_settings.tooltip": "Configurações de pesquisa", "gui.createrailwaysnavigator.navigator.search.tooltip": "Procurar", "gui.createrailwaysnavigator.navigator.location.tooltip": "Estacao mais proxima da posicao atual", "gui.createrailwaysnavigator.navigator.switch.tooltip": "Alternar campos", - "gui.createrailwaysnavigator.route_details.title": "Detalhes da Rota", "gui.createrailwaysnavigator.route_details.departure": "Partida em", "gui.createrailwaysnavigator.route_details.next_transfer_time": "Transferência em", "gui.createrailwaysnavigator.route_details.transfer": "Transferência", - "gui.createrailwaysnavigator.route_details.save_route": "Salvar conexão", - "gui.createrailwaysnavigator.route_overview.title": "Detalhes da Rota", "gui.createrailwaysnavigator.route_overview.journey_begins": "A sua jornada começa aqui! %s a %s, partida %s", "gui.createrailwaysnavigator.route_overview.journey_begins_with_platform": "A sua jornada começa aqui! %s a %s, partida %s na plataforma %s", @@ -125,7 +108,7 @@ "gui.createrailwaysnavigator.route_overview.notification.platform_changed.title": "Sua plataforma mudou!", "gui.createrailwaysnavigator.route_overview.notification.platform_changed": "O seu comboio em %s sai da plataforma %s hoje.", "gui.createrailwaysnavigator.route_overview.notification.train_delayed.title": "%s: Chegada %s atrasada.", - "gui.createrailwaysnavigator.route_overview.notification.train_delayed": "%s em vez de %s em %s", + "gui.createrailwaysnavigator.route_overview.notification.train_delayed": "%s em vez de %s em %s", "gui.createrailwaysnavigator.route_overview.notification.train_cancelled.title": "%s: Comboio cancelado", "gui.createrailwaysnavigator.route_overview.notification.train_cancelled": "%s a %s foi cancelado hoje.", "gui.createrailwaysnavigator.route_overview.notification.transfer.title": "Transferência esta chegando", @@ -138,7 +121,6 @@ "gui.createrailwaysnavigator.route_overview.notification.journey_completed.title": "Chegou ao seu destino!", "gui.createrailwaysnavigator.route_overview.notification.journey_completed": "Obrigado por viajar e tenha um bom dia", "gui.createrailwaysnavigator.route_overview.date": "Dia %s, %s", - "gui.createrailwaysnavigator.global_settings.title": "Configurações globais", "gui.createrailwaysnavigator.global_settings.option.tooltip": "Clique para editar", "gui.createrailwaysnavigator.global_settings.option_alias.title": "Tags da estaçao de comboio", @@ -149,8 +131,6 @@ "gui.createrailwaysnavigator.global_settings.train_group.description": "Criar grupos de comboios para organizar todos os comboios (por exemplo, servicos regionais, servicos de longa distancia, ... ). Os usuarios podem decidir quais grupos desejam usar.", "gui.createrailwaysnavigator.global_settings.train_blacklist.title": "Lista negra de comboios", "gui.createrailwaysnavigator.global_settings.train_blacklist.description": "Excluir comboios, por exemplo, comboios de mercadorias, comboios especiais, etc., para que nao sejam utilizados nas sugestoes de rota.", - - "gui.createrailwaysnavigator.station_tags.title": "Configurações de tags da estação de comboios", "gui.createrailwaysnavigator.station_tags.summary": "Contém %s Track Stations", "gui.createrailwaysnavigator.station_tags.editor": "Última edição por %s em %s", "gui.createrailwaysnavigator.station_tags.add.tooltip": "Criar nova entrada", @@ -160,22 +140,17 @@ "gui.createrailwaysnavigator.station_tags.hint.station_name": "Nome de estação de trilha", "gui.createrailwaysnavigator.station_tags.hint.platform": "Plataforma", "gui.createrailwaysnavigator.station_tags.enter_name": "Digite o nome aqui", - "gui.createrailwaysnavigator.train_group_settings.title": "Configurações do grupo de Comboio", "gui.createrailwaysnavigator.train_group_settings.summary": "Contém %s Comboios", "gui.createrailwaysnavigator.train_group_settings.editor": "Ultima edição por %s em %s", - "gui.createrailwaysnavigator.train_group_settings.delete_alias.tooltip": "Delete Group", "gui.createrailwaysnavigator.train_group_settings.delete_station.tooltip": "Remover comboio", "gui.createrailwaysnavigator.train_group_settings.add_station.tooltip": "Adicionar Comboio", - "gui.createrailwaysnavigator.blacklist.title": "Lista negra da estacao de comboios", "gui.createrailwaysnavigator.blacklist.add.tooltip": "Adicionar a lista negra", "gui.createrailwaysnavigator.blacklist.delete.tooltip": "Remover da lista negra", - "gui.createrailwaysnavigator.train_blacklist.title": "Lista negra de comboios", "gui.createrailwaysnavigator.train_blacklist.add.tooltip": "Adicionar a lista negra", "gui.createrailwaysnavigator.train_blacklist.delete.tooltip": "Remover da lista negra", - "gui.createrailwaysnavigator.search_settings.title": "Configurações de pesquisa", "gui.createrailwaysnavigator.search_settings.transfer_time": "Tempo minimo de transferência", "gui.createrailwaysnavigator.search_settings.transfer_time.description": "O tempo minimo que deve estar disponivel para mudar de comboio. (1h ~ 50 segundos da vida real)", @@ -185,29 +160,22 @@ "gui.createrailwaysnavigator.search_settings.train_groups.overview.all": "Todo", "gui.createrailwaysnavigator.search_settings.train_groups.overview.none": "Não", "gui.createrailwaysnavigator.search_settings.train_groups.tooltip.reset": "Redefinir filtro", - "gui.createrailwaysnavigator.new_text_entry.add.tooltip": "Adicionar", - "gui.createrailwaysnavigator.time": "Tempo: %s", "gui.createrailwaysnavigator.time.now": "agora", "gui.createrailwaysnavigator.time_format.dhm": "%s dias %s hrs. %s min.", - "gui.createrailwaysnavigator.time_format.hm": "%s hrs. %s min.", - "gui.createrailwaysnavigator.time_format.m": "%s min.", - "gui.createrailwaysnavigator.platform": "Plataforma", "gui.createrailwaysnavigator.departure": "Partida", "gui.createrailwaysnavigator.destination": "Destino", "gui.createrailwaysnavigator.line": "Linha", "gui.createrailwaysnavigator.following_trains": "Seguintes Comboios:", "gui.createrailwaysnavigator.via": "Via", - "gui.createrailwaysnavigator.advanced_display_settings.title": "Configurações avançadas de exibição", "gui.createrailwaysnavigator.advanced_display_settings.display_type": "Tipo de exibição", "gui.createrailwaysnavigator.advanced_display_settings.display_type.description": "Determina as informações exibidas.", "gui.createrailwaysnavigator.advanced_display_settings.info_type": "Tipo de informação", "gui.createrailwaysnavigator.advanced_display_settings.info_type.description": "Determina o quão detalhadas sao as informações.", "gui.createrailwaysnavigator.advanced_display_settings.double_sided": "Dupla face", - "enum.createrailwaysnavigator.display_info_type": "Tipo de Informações de Exibição", "enum.createrailwaysnavigator.display_info_type.description": "Determina a quantidade de informações que devem ser exibidas no quadro de exibição.", "enum.createrailwaysnavigator.display_info_type.simple": "Simples", @@ -216,7 +184,6 @@ "enum.createrailwaysnavigator.display_info_type.info.detailed": "As informações mais importantes com alguns detalhes serão mostradas, como velocidade do comboio, escalas, etc.", "enum.createrailwaysnavigator.display_info_type.informative": "Informativo", "enum.createrailwaysnavigator.display_info_type.info.informative": "Mostra todas as informacoes que poderiam ser interessantes e as exibe em um layout sofisticado. Nao recomendado para telas pequenas, pois o texto pode ficar muito pequeno.", - "enum.createrailwaysnavigator.display_type": "Tipo de exibição", "enum.createrailwaysnavigator.display_type.description": "O tipo de exibicao que depende de sua finalidade.", "enum.createrailwaysnavigator.display_type.train_destination": "Destino do Comboio", @@ -225,26 +192,20 @@ "enum.createrailwaysnavigator.display_type.info.passenger_information": "Representa as telas encontradas dentro dos comboios. Essas exibições mostrarao a proxima estação, a direção de saída e (se selecionada) a velocidade do comboio e uma visão geral da rota.", "enum.createrailwaysnavigator.display_type.platform": "Exibição da plataforma", "enum.createrailwaysnavigator.display_type.info.platform": "Esses displays devem ser usados nas plataformas das estações de trem e mostram os próximos comboios com detalhes adicionais, se selecionados. Não pode ser usado em Comboios!", - "enum.createrailwaysnavigator.side": "Lado", "enum.createrailwaysnavigator.side.description": "O lado do bloco onde as informações devem ser renderizadas.", "enum.createrailwaysnavigator.side.front": "Parte Frontal", "enum.createrailwaysnavigator.side.info.front": "As informações serão renderizadas apenas na parte frontal. Esse é o comportamento padrão", "enum.createrailwaysnavigator.side.both": "Ambos os lados", "enum.createrailwaysnavigator.side.info.both": "As informações serao prestadas em ambos os lados.", - "enum.createrailwaysnavigator.time_display": "Exibição de tempo", "enum.createrailwaysnavigator.time_display.description": "Determina como a hora deve ser exibida.", - "enum.createrailwaysnavigator.time_display.abs": "ABS", "enum.createrailwaysnavigator.time_display.info.abs": "ABS (absoluto)", - "enum.createrailwaysnavigator.time_display.eta": "ETA", "enum.createrailwaysnavigator.time_display.info.eta": "ETA (hora prevista de chegada)", - "create.display_source.advanced_display": "Monitores Avancados", "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width": "Largura da coluna do nome do comboio", "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description": "em pixeis de bloco. (Padrão: 16)", "gui.createrailwaysnavigator.display_source.advanced_display.platform_width": "Largura da coluna da plataforma", "gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description": "em píxeis de bloco (Padrão: Auto)", - - "createrailwaysnavigator.moin": "moin" + "gui.createrailwaysnavigator.station_tags.title": "Configurações de tags da estação de comboios" } diff --git a/common/src/main/resources/assets/createrailwaysnavigator/lang/ru_ru.json b/common/src/main/resources/assets/createrailwaysnavigator/lang/ru_ru.json index 0a2d7a74..0f2178a8 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/lang/ru_ru.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/lang/ru_ru.json @@ -1,53 +1,46 @@ { "advancement.createrailwaysnavigator.navigator": "Спасибо за поездку!", - "advancement.createrailwaysnavigator.navigator.description": "Создайте навигатор для поиска маршрутов следования поездов.", + "advancement.createrailwaysnavigator.navigator.description": "Создайте навигатор для поиска маршрутов следования поездов.", "advancement.createrailwaysnavigator.advanced_display": "Не совсем 4k...", "advancement.createrailwaysnavigator.advanced_display.description": "Обновите свои механические табло, чтобы на них отображалось больше информации, и даже разместите их в своих поездах.", - - "itemGroup.createrailwaysnavigator.tab": "Create: Навигатор железных дорог", - "item.createrailwaysnavigator.navigator": "Железнодорожный навигатор", - "item.createrailwaysnavigator.navigator.tooltip.summary": "_Навигатор_ показывает возможные _пересадки к поездам_ и дополнительную информацию, такую как _остановки_, _данные в реальном времени_ и многое другое.", - + "item.createrailwaysnavigator.navigator.tooltip.summary": "_Навигатор_ показывает возможные _пересадки к поездам_ и дополнительную информацию, такую как _остановки_, _данные в реальном времени_ и многое другое.", "block.createrailwaysnavigator.train_station_clock": "Станционные часы", "block.createrailwaysnavigator.advanced_display_block": "Блок улучшенного механического табло", - "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "Используйте в _поездах_ в качестве _табло пункта назначения поезда_ или _табло информации для пассажиров_, а на станциях - в качестве _дисплея платформы,_ которые также отображают больше информации, чем обычные табло.", + "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "Используйте в _поездах_ в качестве _табло пункта назначения поезда_ или _табло информации для пассажиров_, а на станциях - в качестве _дисплея платформы,_ которые также отображают больше информации, чем обычные табло.", "block.createrailwaysnavigator.advanced_display_block.tooltip.condition1": "ПКМ с гаечным ключом", - "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "Открывает меню для _настройки дисплея._", + "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "Открывает меню для _настройки дисплея._", "block.createrailwaysnavigator.advanced_display": "Улучшенное механическое табло", - "block.createrailwaysnavigator.advanced_display.tooltip.summary": "Используйте в _поездах_ в качестве _табло пункта назначения поезда_ или _табло информации для пассажиров_, а на станциях - в качестве _дисплея платформы,_ которые также отображают больше информации, чем обычные табло.", + "block.createrailwaysnavigator.advanced_display.tooltip.summary": "Используйте в _поездах_ в качестве _табло пункта назначения поезда_ или _табло информации для пассажиров_, а на станциях - в качестве _дисплея платформы,_ которые также отображают больше информации, чем обычные табло.", "block.createrailwaysnavigator.advanced_display.tooltip.condition1": "ПКМ с гаечным ключом", - "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "Открывает меню для _настройки дисплея._", + "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "Открывает меню для _настройки дисплея._", "block.createrailwaysnavigator.advanced_display_small": "Малое улучшенное механическое табло", - "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "Используйте в _поездах_ в качестве _табло пункта назначения поезда_ или _табло информации для пассажиров_, а на станциях - в качестве _дисплея платформы,_ которые также отображают больше информации, чем обычные табло.", + "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "Используйте в _поездах_ в качестве _табло пункта назначения поезда_ или _табло информации для пассажиров_, а на станциях - в качестве _дисплея платформы,_ которые также отображают больше информации, чем обычные табло.", "block.createrailwaysnavigator.advanced_display_small.tooltip.condition1": "ПКМ с гаечным ключом", - "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "Открывает меню для _настройки дисплея._", + "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "Открывает меню для _настройки дисплея._", "block.createrailwaysnavigator.advanced_display_panel": "Панель улучшенного механического табло", - "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "Используйте в _поездах_ в качестве _табло пункта назначения поезда_ или _табло информации для пассажиров_, а на станциях - в качестве _дисплея платформы,_ которые также отображают больше информации, чем обычные табло.", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "Используйте в _поездах_ в качестве _табло пункта назначения поезда_ или _табло информации для пассажиров_, а на станциях - в качестве _дисплея платформы,_ которые также отображают больше информации, чем обычные табло.", "block.createrailwaysnavigator.advanced_display_panel.tooltip.condition1": "ПКМ с гаечным ключом", - "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "Открывает меню для _настройки дисплея._", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "Открывает меню для _настройки дисплея._", "block.createrailwaysnavigator.advanced_display_half_panel": "Полупанель улучшенного механического табло", - "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "Используйте в _поездах_ в качестве _табло пункта назначения поезда_ или _табло информации для пассажиров_, а на станциях - в качестве _дисплея платформы,_ которые также отображают больше информации, чем обычные табло.", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "Используйте в _поездах_ в качестве _табло пункта назначения поезда_ или _табло информации для пассажиров_, а на станциях - в качестве _дисплея платформы,_ которые также отображают больше информации, чем обычные табло.", "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.condition1": "ПКМ с гаечным ключом", - "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "Открывает меню для _настройки дисплея._", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "Открывает меню для _настройки дисплея._", "block.createrailwaysnavigator.advanced_display_sloped": "Наклонное улучшенное механическое табло", - "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "Используйте в _поездах_ в качестве _табло пункта назначения поезда_ или _табло информации для пассажиров_, а на станциях - в качестве _дисплея платформы,_ которые также отображают больше информации, чем обычные табло.", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "Используйте в _поездах_ в качестве _табло пункта назначения поезда_ или _табло информации для пассажиров_, а на станциях - в качестве _дисплея платформы,_ которые также отображают больше информации, чем обычные табло.", "block.createrailwaysnavigator.advanced_display_sloped.tooltip.condition1": "ПКМ с гаечным ключом", - "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "Открывает меню для _настройки дисплея._", - + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "Открывает меню для _настройки дисплея._", + "block.createrailwaysnavigator.advanced_display_slab": "Расширенная Информационная Плита", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.condition1": "При нажатии правой кнопкой мыши с использованием гаечного ключа", "block.createrailwaysnavigator.advanced_display.ber.not_in_service": "Вышел из строя!", - "category.createrailwaysnavigator.crn": "Create: Навигатор железных дорог", "key.createrailwaysnavigator.route_overlay_options": "Показать параметры наложения маршрута", - "enum.createrailwaysnavigator.overlay_position": "Позиция наложения", "enum.createrailwaysnavigator.overlay_position.info.top_left": "Левый верхний угол", "enum.createrailwaysnavigator.overlay_position.info.top_right": "Правый верхний угол", "enum.createrailwaysnavigator.overlay_position.info.bottom_left": "Левый нижний угол", "enum.createrailwaysnavigator.overlay_position.info.bottom_right": "Правый нижний угол", - "gui.createrailwaysnavigator.loading.title": "Загрузка данных с сервера...", - "gui.createrailwaysnavigator.overlay_settings.title": "Настройки наложения маршрута", "gui.createrailwaysnavigator.route_overlay_settings.show_details": "Показать детали", "gui.createrailwaysnavigator.route_overlay_settings.unpin": "Удалить наложение маршрута", @@ -60,7 +53,6 @@ "gui.createrailwaysnavigator.route_overlay_settings.narrator.description": "Диктор объявляет о важных событиях в вашем путешествии, например, о следующей остановке, пересадках и т.д.", "gui.createrailwaysnavigator.route_overlay_settings.notifications": "Уведомления", "gui.createrailwaysnavigator.route_overlay_settings.notifications.description": "Получайте мгновенные уведомления о важных событиях в вашем путешествии, например, о следующей остановке, пересадках и т.д.", - "gui.createrailwaysnavigator.common.expand": "Показать детали", "gui.createrailwaysnavigator.common.collapse": "Скрыть детали", "gui.createrailwaysnavigator.common.go_back": "Вернуться", @@ -72,7 +64,9 @@ "gui.createrailwaysnavigator.common.search": "Поиск", "gui.createrailwaysnavigator.common.auto": "Авто", "gui.createrailwaysnavigator.common.server_error": "Ошибка сервера при выполнении задачи. Подробности смотрите в консоли.", - + "gui.createrailwaysnavigator.common.delete": "Удалить", + "gui.createrailwaysnavigator.common.add": "Добавить", + "gui.createrailwaysnavigator.common.help": "Получить помощь", "gui.createrailwaysnavigator.navigator.title": "Железнодорожный навигатор", "gui.createrailwaysnavigator.navigator.no_connections": "Никаких маршрутов не найдено.", "gui.createrailwaysnavigator.navigator.not_searched": "Пока ничего не найдено.", @@ -87,14 +81,12 @@ "gui.createrailwaysnavigator.navigator.search_settings.tooltip": "Поиск настроек", "gui.createrailwaysnavigator.navigator.search.tooltip": "Поиск", "gui.createrailwaysnavigator.navigator.location.tooltip": "Ближайшая станция", + "gui.createrailwaysnavigator.navigator.refresh.tooltip": "Обновить", "gui.createrailwaysnavigator.navigator.switch.tooltip": "Переключить поля", - "gui.createrailwaysnavigator.route_details.title": "Детали маршрута", "gui.createrailwaysnavigator.route_details.departure": "Отправление через", "gui.createrailwaysnavigator.route_details.next_transfer_time": "Пересадка на", "gui.createrailwaysnavigator.route_details.transfer": "Пересадка", - "gui.createrailwaysnavigator.route_details.save_route": "Сохранить соединение", - "gui.createrailwaysnavigator.route_overview.title": "Детали маршрута", "gui.createrailwaysnavigator.route_overview.journey_begins": "Ваше поездка начинается! %s в сторону %s, отправление в %s", "gui.createrailwaysnavigator.route_overview.journey_begins_with_platform": "Ваша поездка начинается! %s в сторону %s, отправление в %s на платформе %s", @@ -124,7 +116,7 @@ "gui.createrailwaysnavigator.route_overview.notification.platform_changed.title": "Ваша платформа изменилась!", "gui.createrailwaysnavigator.route_overview.notification.platform_changed": "Ваш поезд в %s отходит от платформы %s сегодня.", "gui.createrailwaysnavigator.route_overview.notification.train_delayed.title": "%s: прибытие %s задержка.", - "gui.createrailwaysnavigator.route_overview.notification.train_delayed": "%s вместо %s на %s", + "gui.createrailwaysnavigator.route_overview.notification.train_delayed": "%s вместо %s на %s", "gui.createrailwaysnavigator.route_overview.notification.train_cancelled.title": "%s: Поезд отменён", "gui.createrailwaysnavigator.route_overview.notification.train_cancelled": "%s в сторону %s отменён сегодня.", "gui.createrailwaysnavigator.route_overview.notification.transfer.title": "Пересадка скоро", @@ -137,7 +129,6 @@ "gui.createrailwaysnavigator.route_overview.notification.journey_completed.title": "Вы достигли места назначения!", "gui.createrailwaysnavigator.route_overview.notification.journey_completed": "Спасибо за поездку", "gui.createrailwaysnavigator.route_overview.date": "День %s, %s", - "gui.createrailwaysnavigator.global_settings.title": "Глобальные настройки", "gui.createrailwaysnavigator.global_settings.option.tooltip": "Нажмите, чтобы изменить", "gui.createrailwaysnavigator.global_settings.option_alias.title": "Теги станции", @@ -148,33 +139,28 @@ "gui.createrailwaysnavigator.global_settings.train_group.description": "Проведите классификацию поездов (например, региональные, междугородние и т.д.). Игроки могут сами выбирать группы.", "gui.createrailwaysnavigator.global_settings.train_blacklist.title": "Чёрный список поездов", "gui.createrailwaysnavigator.global_settings.train_blacklist.description": "Исключите поезда, например, грузовые, специальные и т.д., чтобы они не использовались в предложениях по маршруту.", - - "gui.createrailwaysnavigator.station_tags.title": "Настройки тегов станций", "gui.createrailwaysnavigator.station_tags.summary": "Количество станций: %s", "gui.createrailwaysnavigator.station_tags.editor": "Изменён %s в %s", "gui.createrailwaysnavigator.station_tags.add.tooltip": "Создать новую запись", "gui.createrailwaysnavigator.station_tags.delete_alias.tooltip": "Удалить тег", "gui.createrailwaysnavigator.station_tags.delete_station.tooltip": "Удалить станцию", + "gui.createrailwaysnavigator.station_tags.modify_platform.tooltip": "Нажмите, чтобы изменить", "gui.createrailwaysnavigator.station_tags.add_station.tooltip": "Добавить станцию", "gui.createrailwaysnavigator.station_tags.hint.station_name": "Имя станции", "gui.createrailwaysnavigator.station_tags.hint.platform": "Платформа", "gui.createrailwaysnavigator.station_tags.enter_name": "Ввести имя здесь", - "gui.createrailwaysnavigator.train_group_settings.title": "Найстройки групп поездов", "gui.createrailwaysnavigator.train_group_settings.summary": "Включает %s Tпоездов", "gui.createrailwaysnavigator.train_group_settings.editor": "Изменено %s в %s", "gui.createrailwaysnavigator.train_group_settings.delete_alias.tooltip": "Удалить группу", "gui.createrailwaysnavigator.train_group_settings.delete_station.tooltip": "Удалить поезд", "gui.createrailwaysnavigator.train_group_settings.add_station.tooltip": "Добавить поезд", - "gui.createrailwaysnavigator.blacklist.title": "Чёрный список станций", "gui.createrailwaysnavigator.blacklist.add.tooltip": "Добавить в ЧС", "gui.createrailwaysnavigator.blacklist.delete.tooltip": "Удалить из ЧС", - "gui.createrailwaysnavigator.train_blacklist.title": "Чёрный список поездов", "gui.createrailwaysnavigator.train_blacklist.add.tooltip": "Добавить в ЧС", "gui.createrailwaysnavigator.train_blacklist.delete.tooltip": "Удалить из ЧС", - "gui.createrailwaysnavigator.search_settings.title": "Поиск настроек", "gui.createrailwaysnavigator.search_settings.transfer_time": "Минимальное время пересадки", "gui.createrailwaysnavigator.search_settings.transfer_time.description": "Минимальное время для пересадки на поезд. (1h ~ 50 реальных секунд)", @@ -184,29 +170,24 @@ "gui.createrailwaysnavigator.search_settings.train_groups.overview.all": "Выбраны все категории", "gui.createrailwaysnavigator.search_settings.train_groups.overview.none": "Ни одна из категорий не выбрана", "gui.createrailwaysnavigator.search_settings.train_groups.tooltip.reset": "Сбросить фильтры", - "gui.createrailwaysnavigator.new_text_entry.add.tooltip": "Добавить", - "gui.createrailwaysnavigator.time": "Время: %s", "gui.createrailwaysnavigator.time.now": "0 сек", "gui.createrailwaysnavigator.time_format.dhm": "%s дней %s часов %s мин.", "gui.createrailwaysnavigator.time_format.hm": "%s часов. %s мин.", "gui.createrailwaysnavigator.time_format.m": "%s мин.", - "gui.createrailwaysnavigator.platform": "Платформа", "gui.createrailwaysnavigator.departure": "Отправление", "gui.createrailwaysnavigator.destination": "Пункт назначения", "gui.createrailwaysnavigator.line": "Линия", "gui.createrailwaysnavigator.following_trains": "Следующие поезда:", "gui.createrailwaysnavigator.via": "к станции", - "gui.createrailwaysnavigator.advanced_display_settings.title": "Настройки улучшенного дисплея", "gui.createrailwaysnavigator.advanced_display_settings.display_type": "Тип дисплея", "gui.createrailwaysnavigator.advanced_display_settings.display_type.description": "Определяет отображаемую информацию.", "gui.createrailwaysnavigator.advanced_display_settings.info_type": "Тип информации", "gui.createrailwaysnavigator.advanced_display_settings.info_type.description": "Определяет, насколько подробной является информация.", "gui.createrailwaysnavigator.advanced_display_settings.double_sided": "Двухсторонний", - "enum.createrailwaysnavigator.display_info_type": "Тип информации дисплея", "enum.createrailwaysnavigator.display_info_type.description": "Определяет, какой объем информации должен отображаться на вашем дисплее.", "enum.createrailwaysnavigator.display_info_type.simple": "Простой", @@ -215,7 +196,6 @@ "enum.createrailwaysnavigator.display_info_type.info.detailed": "Будет показана наиболее важная информация с некоторыми подробностями, такими как скорость поезда, остановки в пути и т.д.", "enum.createrailwaysnavigator.display_info_type.informative": "Информативный", "enum.createrailwaysnavigator.display_info_type.info.informative": "Отображает всю информацию, которая может быть интересна, и представляет ее в необычном формате. Не рекомендуется для небольших дисплеев, так как текст может стать очень мелким.", - "enum.createrailwaysnavigator.display_type": "Тип дисплея", "enum.createrailwaysnavigator.display_type.description": "Тип вашего дисплея зависит от его назначения.", "enum.createrailwaysnavigator.display_type.train_destination": "Табло пункта назначения поезда", @@ -224,28 +204,47 @@ "enum.createrailwaysnavigator.display_type.info.passenger_information": "Отображает дисплеи, расположенные внутри поездов. На этих дисплеях будут отображаться следующая остановка, направление выхода и (если выбрано) скорость движения поезда, а также обзор маршрута.", "enum.createrailwaysnavigator.display_type.platform": "Дисплей платформы", "enum.createrailwaysnavigator.display_type.info.platform": "Эти дисплеи следует использовать на платформах железнодорожных вокзалов, и на них отображаются следующие поезда с дополнительной информацией, если они выбраны. Нельзя использовать в поездах!", - "enum.createrailwaysnavigator.side": "Сторона", "enum.createrailwaysnavigator.side.description": "Сторона блока, на которой должна отображаться информация.", "enum.createrailwaysnavigator.side.front": "Лицевая сторона", "enum.createrailwaysnavigator.side.info.front": "Информация будет отображаться только на лицевой стороне. Это поведение по умолчанию.", "enum.createrailwaysnavigator.side.both": "Обе стороны", "enum.createrailwaysnavigator.side.info.both": "Информация будет отображаться с обеих сторон.", - "enum.createrailwaysnavigator.time_display": "Отображение времени", "enum.createrailwaysnavigator.time_display.description": "Определяет, как должно отображаться время.", "enum.createrailwaysnavigator.time_display.abs": "АБС", "enum.createrailwaysnavigator.time_display.info.abs": "АБС (Абсолютное)", "enum.createrailwaysnavigator.time_display.eta": "ПВП", "enum.createrailwaysnavigator.time_display.info.eta": "ПВП (Предполагаемое время прибытия)", - "create.display_source.advanced_display": "Улучшенные дисплеи", "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width": "Ширина столбца с названием поезда", "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description": "в пикселях блока. (По умолчанию: 16)", "gui.createrailwaysnavigator.display_source.advanced_display.platform_width": "Ширина колонны платформы", "gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description": "в пикселях блока. (По умолчанию: Авто)", - - "createrailwaysnavigator.moin": "moin", - - "createrailwaysnavigator.credits": "Над переводом работал VGamerGroup" -} \ No newline at end of file + "gui.createrailwaysnavigator.section_settings.title": "Настройки раздела", + "gui.createrailwaysnavigator.section_settings.train_groups": "Назначить группу поездов", + "gui.createrailwaysnavigator.section_settings.train_lines": "Назначить линию поезда", + "gui.createrailwaysnavigator.section_settings.usable": "Проходимый", + "createrailwaysnavigator.schedule.condition.dynamic_delay": "Динамическая задержка", + "createrailwaysnavigator.schedule.condition.dynamic_delay.min_duration": "Минимальная продолжительность", + "createrailwaysnavigator.schedule.instruction.travel_section": "Новый раздел расписания", + "createrailwaysnavigator.schedule.instruction.travel_section.description": "Начало нового раздела расписания.", + "createrailwaysnavigator.schedule.instruction.travel_section.configure": "Настроить...", + "display.createrailwaysnavigator.train_destination.simple": "Компактно", + "display.createrailwaysnavigator.train_destination.extended": "Расширенно", + "display.createrailwaysnavigator.train_destination.detailed": "Детально", + "gui.createrailwaysnavigator.station_tags.title": "Настройки тегов станций", + "gui.createrailwaysnavigator.empty_list": "Список пуст", + "gui.createrailwaysnavigator.saved_routes.saved": "%s Сохранён", + "gui.createrailwaysnavigator.route_overview.notification.schedule_changed": "Расписание сохранённого маршрута изменилось. Пожалуйста, проверьте навигатор для этих изменений.", + "gui.createrailwaysnavigator.saved_routes.saved_route": "Сохранённый маршрут", + "block.createrailwaysnavigator.advanced_display.ber.arrival": "Прибытие", + "block.createrailwaysnavigator.advanced_display.ber.delayed": "Задержка приблизительно %s минут", + "gui.createrailwaysnavigator.saved_routes.tomorrow": "Завтра", + "gui.createrailwaysnavigator.saved_route_widget.share": "Поделиться...", + "gui.createrailwaysnavigator.train_status.track_closed": "Путь закрыт", + "gui.createrailwaysnavigator.route_details.save_route.tooltip": "Сохранить маршрут", + "gui.createrailwaysnavigator.route_details.remove_route.tooltip": "Удалить маршрут", + "gui.createrailwaysnavigator.route_details.show_popup.tooltip": "Показать всплывающее окно", + "gui.createrailwaysnavigator.navigator.my_profile": "Мой профиль" +} diff --git a/common/src/main/resources/assets/createrailwaysnavigator/lang/sv_se.json b/common/src/main/resources/assets/createrailwaysnavigator/lang/sv_se.json index 57b9c4cf..7081ffa3 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/lang/sv_se.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/lang/sv_se.json @@ -1,59 +1,53 @@ { "advancement.createrailwaysnavigator.navigator": "Tack för att du reser med oss!", - "advancement.createrailwaysnavigator.navigator.description": "Tillverka en Navigator för att söka efter tågförbildelser från en station till en annan.", + "advancement.createrailwaysnavigator.navigator.description": "Tillverka en Navigator för att söka efter tågförbildelser från en station till en annan.", "advancement.createrailwaysnavigator.advanced_display": "Inte riktigt 4k", "advancement.createrailwaysnavigator.advanced_display.description": "Upgradera dina displaytavlor till att visa mer information som även funkar i tåg.", - - "itemGroup.createrailwaysnavigator.tab": "Create Railways Navigator", - - "item.createrailwaysnavigator.navigator": "Create Railways Navigator", - "item.createrailwaysnavigator.navigator.tooltip.summary": "The _navigator_ shows possible _train connections_ with additional information such as _stopovers_, _real-time data_ and more.", - + "item.createrailwaysnavigator.navigator": "Create Järnvägsnavigerare", + "item.createrailwaysnavigator.navigator.tooltip.summary": "_Navigatorn_ visar möjliga _tågbyten_ med extra information, till exempel _mellanlandningar_, _data i realtid_ med mera.", "block.createrailwaysnavigator.train_station_clock": "Tåstationsklocka", "block.createrailwaysnavigator.advanced_display_block": "Avancerat Displayblock", - "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "Använd den på _tåg_, som en _tågdestinationsdisplay_ eller _passagerarinformationsdisplay_, eller på _tågstationer_ som förbättrade _plattformsdisplayer_ som också visar mer information än vanliga displaytavlor.", + "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "Använd den på _tåg_, som en _tågdestinationsdisplay_ eller _passagerarinformationsdisplay_, eller på _tågstationer_ som förbättrade _plattformsdisplayer_ som också visar mer information än vanliga displaytavlor.", "block.createrailwaysnavigator.advanced_display_block.tooltip.condition1": "När R-Klickats med en skiftnyckel", - "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "Öppna en meny för att _konfigurera_ _displayen_.", + "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "Öppna en meny för att _konfigurera_ _displayen_.", "block.createrailwaysnavigator.advanced_display": "Avancerad Displaytavla", - "block.createrailwaysnavigator.advanced_display.tooltip.summary": "Använd den på _tåg_, som en _tågdestinationsdisplay_ eller _passagerarinformationsdisplay_, eller på _tågstationer_ som förbättrade _plattformsdisplayer_ som också visar mer information än vanliga displaytavlor.", + "block.createrailwaysnavigator.advanced_display.tooltip.summary": "Använd den på _tåg_, som en _tågdestinationsdisplay_ eller _passagerarinformationsdisplay_, eller på _tågstationer_ som förbättrade _plattformsdisplayer_ som också visar mer information än vanliga displaytavlor.", "block.createrailwaysnavigator.advanced_display.tooltip.condition1": "När R-Klickats med en skiftnyckel", - "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "Öppna en meny för att _konfigurera_ _displayen_.", + "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "Öppna en meny för att _konfigurera_ _displayen_.", "block.createrailwaysnavigator.advanced_display_small": "Liten Avancerad Skärm", - "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "Använd den på _tåg_, som en _tågdestinationsdisplay_ eller _passagerarinformationsdisplay_, eller på _tågstationer_ som förbättrade _plattformsdisplayer_ som också visar mer information än vanliga displaytavlor.", + "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "Använd den på _tåg_, som en _tågdestinationsdisplay_ eller _passagerarinformationsdisplay_, eller på _tågstationer_ som förbättrade _plattformsdisplayer_ som också visar mer information än vanliga displaytavlor.", "block.createrailwaysnavigator.advanced_display_small.tooltip.condition1": "När R-Klickats med en skiftnyckel", - "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "Öppna en meny för att _konfigurera_ _displayen_.", + "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "Öppna en meny för att _konfigurera_ _displayen_.", "block.createrailwaysnavigator.advanced_display_panel": "Avancerad Skärmpanel", - "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "Använd den på _tåg_, som en _tågdestinationsdisplay_ eller _passagerarinformationsdisplay_, eller på _tågstationer_ som förbättrade _plattformsdisplayer_ som också visar mer information än vanliga displaytavlor.", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "Använd den på _tåg_, som en _tågdestinationsdisplay_ eller _passagerarinformationsdisplay_, eller på _tågstationer_ som förbättrade _plattformsdisplayer_ som också visar mer information än vanliga displaytavlor.", "block.createrailwaysnavigator.advanced_display_panel.tooltip.condition1": "När R-Klickats med en skiftnyckel", - "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "Öppna en meny för att _konfigurera_ _displayen_.", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "Öppna en meny för att _konfigurera_ _displayen_.", "block.createrailwaysnavigator.advanced_display_half_panel": "Halv Avancerad Skärmpanel", - "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "Använd den på _tåg_, som en _tågdestinationsdisplay_ eller _passagerarinformationsdisplay_, eller på _tågstationer_ som förbättrade _plattformsdisplayer_ som också visar mer information än vanliga displaytavlor.", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "Använd den på _tåg_, som en _tågdestinationsdisplay_ eller _passagerarinformationsdisplay_, eller på _tågstationer_ som förbättrade _plattformsdisplayer_ som också visar mer information än vanliga displaytavlor.", "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.condition1": "När R-Klickats med en skiftnyckel", - "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "Öppna en meny för att _konfigurera_ _displayen_.", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "Öppna en meny för att _konfigurera_ _displayen_.", "block.createrailwaysnavigator.advanced_display_sloped": "Lutande Avancerad Skärm", - "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "Använd den på _tåg_, som en _tågdestinationsdisplay_ eller _passagerarinformationsdisplay_, eller på _tågstationer_ som förbättrade _plattformsdisplayer_ som också visar mer information än vanliga displaytavlor.", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "Använd den på _tåg_, som en _tågdestinationsdisplay_ eller _passagerarinformationsdisplay_, eller på _tågstationer_ som förbättrade _plattformsdisplayer_ som också visar mer information än vanliga displaytavlor.", "block.createrailwaysnavigator.advanced_display_sloped.tooltip.condition1": "När R-Klickats med en skiftnyckel", - "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "Öppna en meny för att _konfigurera_ _displayen_.", - + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "Öppna en meny för att _konfigurera_ _displayen_.", + "block.createrailwaysnavigator.advanced_display_slab": "Avancerad visningsplatta", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.summary": "Använd den på _tåg_, som en _tågdestinationsdisplay_ eller _passagerarinformationsdisplay_, eller på _tågstationer_ som förbättrade _plattformsdisplayer_ som också visar mer information än vanliga displaytavlor.", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.condition1": "När R-Klickats med en skiftnyckel", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.behaviour1": "Öppna en meny för att _konfigurera_ _displayen_.", "block.createrailwaysnavigator.advanced_display.ber.not_in_service": "Ej i trafik", - "block.createrailwaysnavigator.advanced_display.ber.shunting_trip": "Abonnerad", - - "category.createrailwaysnavigator.crn": "Create Railways Navigator", - "key.createrailwaysnavigator.route_overlay_options": "Visa Alternativ För Ruttöverlagring", - + "category.createrailwaysnavigator.crn": "Create Järnvägsnavigerare", + "key.createrailwaysnavigator.route_overlay_options": "Visa Alternativ För Ruttöverlägg", "enum.createrailwaysnavigator.overlay_position": "Visa Position", "enum.createrailwaysnavigator.overlay_position.info.top_left": "Övre Vänstra Hörnet", "enum.createrailwaysnavigator.overlay_position.info.top_right": "Övre Högra Hörnet", "enum.createrailwaysnavigator.overlay_position.info.bottom_left": "Nedre Vänstra Hörnet", "enum.createrailwaysnavigator.overlay_position.info.bottom_right": "Nedre Högra Hörnet", - - "gui.createrailwaysnavigator.loading.title": "Downloading data from server...", - + "gui.createrailwaysnavigator.loading.title": "Hämtar data från server...", "gui.createrailwaysnavigator.overlay_settings.title": "Inställningar för ruttöverlagring", "gui.createrailwaysnavigator.route_overlay_settings.show_details": "Visa detaljer", "gui.createrailwaysnavigator.route_overlay_settings.unpin": "Ta bort ruttöverlagring", "gui.createrailwaysnavigator.route_overlay_settings.narrator.on": "Berättarmeddelanden har aktiverats.", - "gui.createrailwaysnavigator.route_overlay_settings.narrator.off": "Berättarmeddelanden har inaktiverats.", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.off": "Berättarmeddelanden har inaktiverats.", "gui.createrailwaysnavigator.route_overlay_settings.notifications.on": "Aviseringar har aktiverats", "gui.createrailwaysnavigator.route_overlay_settings.notifications.off": "Aviseringar har inaktiverats", "gui.createrailwaysnavigator.route_overlay_settings.scale": "GUI Storlek", @@ -61,7 +55,6 @@ "gui.createrailwaysnavigator.route_overlay_settings.narrator.description": "Berättaren tillkännager viktiga händelser på din resa, t.ex. nästa stopp, förändringar osv.", "gui.createrailwaysnavigator.route_overlay_settings.notifications": "Aviseringar", "gui.createrailwaysnavigator.route_overlay_settings.notifications.description": "Få toast-aviseringar om viktiga händelser på din resa, t.ex. nästa stopp, förändringar osv.", - "gui.createrailwaysnavigator.common.expand": "Visa Detaljer", "gui.createrailwaysnavigator.common.collapse": "Dölj Detaljer", "gui.createrailwaysnavigator.common.go_back": "Gå Tillbaka", @@ -73,8 +66,10 @@ "gui.createrailwaysnavigator.common.search": "Sök", "gui.createrailwaysnavigator.common.auto": "Auto", "gui.createrailwaysnavigator.common.server_error": "Serverfel när uppgiften körs. Se konsolen för detaljer.", - - "gui.createrailwaysnavigator.navigator.title": "Create Railways Navigator", + "gui.createrailwaysnavigator.common.delete": "Radera", + "gui.createrailwaysnavigator.common.add": "Lägg till", + "gui.createrailwaysnavigator.common.help": "Få hjälp", + "gui.createrailwaysnavigator.navigator.title": "Create Järnvägsnavigerare", "gui.createrailwaysnavigator.navigator.no_connections": "Inga anslutningar hittades.", "gui.createrailwaysnavigator.navigator.not_searched": "Inget sökt ännu.", "gui.createrailwaysnavigator.navigator.searching": "Sök efter anslutningar...", @@ -82,20 +77,18 @@ "gui.createrailwaysnavigator.navigator.start_end_null": "Start eller destination är tom.", "gui.createrailwaysnavigator.navigator.start_end_equal": "Du har angett samma start och destination.", "gui.createrailwaysnavigator.navigator.route_entry.connection_in_past": "❌ Anslutning i det förflutna", - "gui.createrailwaysnavigator.navigator.route_entry.transfer": "Trans.", + "gui.createrailwaysnavigator.navigator.route_entry.transfer": "Byte", "gui.createrailwaysnavigator.navigator.route_entry.station_start": "från %s", "gui.createrailwaysnavigator.navigator.global_settings.tooltip": "Globala Inställningar", "gui.createrailwaysnavigator.navigator.search_settings.tooltip": "Sökinställningar", "gui.createrailwaysnavigator.navigator.search.tooltip": "Sök", - "gui.createrailwaysnavigator.navigator.location.tooltip": "Närmaste station från nuvarande position", + "gui.createrailwaysnavigator.navigator.location.tooltip": "Närmsta station från nuvarande position", + "gui.createrailwaysnavigator.navigator.refresh.tooltip": "Ladda om", "gui.createrailwaysnavigator.navigator.switch.tooltip": "Växla fält", - "gui.createrailwaysnavigator.route_details.title": "Ruttdetaljer", "gui.createrailwaysnavigator.route_details.departure": "Avgår om", "gui.createrailwaysnavigator.route_details.next_transfer_time": "Vidarekoppling om", "gui.createrailwaysnavigator.route_details.transfer": "Byte", - "gui.createrailwaysnavigator.route_details.save_route": "Spara Anslutning", - "gui.createrailwaysnavigator.route_overview.title": "Ruttdetaljer", "gui.createrailwaysnavigator.route_overview.journey_begins": "Din resa börjar! %s mot %s, avgår %s", "gui.createrailwaysnavigator.route_overview.journey_begins_with_platform": "Din resa börjar! %s mot %s, avgår %s från plattform %s", @@ -125,7 +118,7 @@ "gui.createrailwaysnavigator.route_overview.notification.platform_changed.title": "Din anslutning har ändrat plattform!", "gui.createrailwaysnavigator.route_overview.notification.platform_changed": "Ditt tåg i %s går från perrong %s idag.", "gui.createrailwaysnavigator.route_overview.notification.train_delayed.title": "%s: Ankomst %s försenad.", - "gui.createrailwaysnavigator.route_overview.notification.train_delayed": "%s istället för %s i %s", + "gui.createrailwaysnavigator.route_overview.notification.train_delayed": "%s istället för %s i %s", "gui.createrailwaysnavigator.route_overview.notification.train_cancelled.title": "%s: Avgång inställd", "gui.createrailwaysnavigator.route_overview.notification.train_cancelled": "%s mot %s är tyvärr inställd idag.", "gui.createrailwaysnavigator.route_overview.notification.transfer.title": "Din anslutning är på väg", @@ -138,44 +131,38 @@ "gui.createrailwaysnavigator.route_overview.notification.journey_completed.title": "Du är framme vid din destination!", "gui.createrailwaysnavigator.route_overview.notification.journey_completed": "Tack för att du reser med oss och ha en fortsatt trevlig dag!", "gui.createrailwaysnavigator.route_overview.date": "Dag %s, %s", - "gui.createrailwaysnavigator.global_settings.title": "Globala Inställningar", "gui.createrailwaysnavigator.global_settings.option.tooltip": "Klicka för att ändra", "gui.createrailwaysnavigator.global_settings.option_alias.title": "Stationstaggar", - "gui.createrailwaysnavigator.global_settings.option_alias.description": "Definiera stationstaggar för att definera multiplattformsstationer (t.ex. MinStation 1, MinStation 2, ...) som en enda station (t.ex. MinStation) med anpassade namn.", + "gui.createrailwaysnavigator.global_settings.option_alias.description": "Slå samman enstaka tågstationer till en multiplattformsstation med sitt egna namn så att navigatorn kan föreslå byten, m.m.", "gui.createrailwaysnavigator.global_settings.option_blacklist.title": "Stationssvartlista", "gui.createrailwaysnavigator.global_settings.option_blacklist.description": "Uteslut stationer som inte ska visas i navigeringsresultaten. Dessa stationer kommer att ignoreras när rutter genereras.", "gui.createrailwaysnavigator.global_settings.train_group.title": "Tåggrupper", "gui.createrailwaysnavigator.global_settings.train_group.description": "Skapa tåggrupper för att organisera alla tåg (t.ex. regionaltrafik, fjärrtrafik, ...). Användare kan bestämma vilka grupper de vill använda.", "gui.createrailwaysnavigator.global_settings.train_blacklist.title": "Tågsvartlista", "gui.createrailwaysnavigator.global_settings.train_blacklist.description": "Uteslut tåg, t.ex. godståg, specialtåg etc. så att de inte används i ruttförslagen.", - - "gui.createrailwaysnavigator.station_tags.title": "Inställningar För Stationstaggar", "gui.createrailwaysnavigator.station_tags.summary": "Innehåller %s stationer", "gui.createrailwaysnavigator.station_tags.editor": "Senast redigerad av %s den %s", "gui.createrailwaysnavigator.station_tags.add.tooltip": "Skapa ny Post", "gui.createrailwaysnavigator.station_tags.delete_alias.tooltip": "Radera Tag", "gui.createrailwaysnavigator.station_tags.delete_station.tooltip": "Radera Station", + "gui.createrailwaysnavigator.station_tags.modify_platform.tooltip": "Klicka för att ändra", "gui.createrailwaysnavigator.station_tags.add_station.tooltip": "Lägg till Station", "gui.createrailwaysnavigator.station_tags.hint.station_name": "Stationsnamn", "gui.createrailwaysnavigator.station_tags.hint.platform": "Plattform", "gui.createrailwaysnavigator.station_tags.enter_name": "Ange namn här", - "gui.createrailwaysnavigator.train_group_settings.title": "Tåggruppinställningar", "gui.createrailwaysnavigator.train_group_settings.summary": "Innehåller %s tåg", "gui.createrailwaysnavigator.train_group_settings.editor": "Senast redigerad av %s den %s", "gui.createrailwaysnavigator.train_group_settings.delete_alias.tooltip": "Radera Grupp", "gui.createrailwaysnavigator.train_group_settings.delete_station.tooltip": "Radera Tåg", "gui.createrailwaysnavigator.train_group_settings.add_station.tooltip": "Lägg till Tåg", - "gui.createrailwaysnavigator.blacklist.title": "Stationssvartlista", "gui.createrailwaysnavigator.blacklist.add.tooltip": "Lägg till på svartlistan", "gui.createrailwaysnavigator.blacklist.delete.tooltip": "Ta bort från svartlistan", - "gui.createrailwaysnavigator.train_blacklist.title": "Tågsvartlista", "gui.createrailwaysnavigator.train_blacklist.add.tooltip": "Lägg till på svartlistan", "gui.createrailwaysnavigator.train_blacklist.delete.tooltip": "Ta bort från svartlistan", - "gui.createrailwaysnavigator.search_settings.title": "Sökinställningar", "gui.createrailwaysnavigator.search_settings.transfer_time": "Minsta överföringstid", "gui.createrailwaysnavigator.search_settings.transfer_time.description": "Den minsta tid som bör finnas tillgänglig för att byta tåg. (1h ~ 50 Sekunder i Verkliga Livet)", @@ -185,29 +172,24 @@ "gui.createrailwaysnavigator.search_settings.train_groups.overview.all": "Alla", "gui.createrailwaysnavigator.search_settings.train_groups.overview.none": "Inga", "gui.createrailwaysnavigator.search_settings.train_groups.tooltip.reset": "Återställ filter", - "gui.createrailwaysnavigator.new_text_entry.add.tooltip": "Lägg till", - "gui.createrailwaysnavigator.time": "Tid: %s", "gui.createrailwaysnavigator.time.now": "Nu", "gui.createrailwaysnavigator.time_format.dhm": "%s dgr %s tim. %s min.", "gui.createrailwaysnavigator.time_format.hm": "%s tim. %s min.", "gui.createrailwaysnavigator.time_format.m": "%s min.", - "gui.createrailwaysnavigator.platform": "Plattform", - "gui.createrailwaysnavigator.departure": "Avgpng", + "gui.createrailwaysnavigator.departure": "Avgång", "gui.createrailwaysnavigator.destination": "Destination", "gui.createrailwaysnavigator.line": "Linje", "gui.createrailwaysnavigator.following_trains": "Följande anslutningar:", "gui.createrailwaysnavigator.via": "via", - "gui.createrailwaysnavigator.advanced_display_settings.title": "Avancerade Skärminställningar", "gui.createrailwaysnavigator.advanced_display_settings.display_type": "Skärmtyp", "gui.createrailwaysnavigator.advanced_display_settings.display_type.description": "Avgör vilken information som visas.", "gui.createrailwaysnavigator.advanced_display_settings.info_type": "Informationstyp", "gui.createrailwaysnavigator.advanced_display_settings.info_type.description": "Avgör hur detaljerad informationen är.", "gui.createrailwaysnavigator.advanced_display_settings.double_sided": "Dubbelsidig", - "enum.createrailwaysnavigator.display_info_type": "Visa Infotyp", "enum.createrailwaysnavigator.display_info_type.description": "Bestämmer hur mycket information som ska visas på skärmen.", "enum.createrailwaysnavigator.display_info_type.simple": "Enkel", @@ -216,7 +198,6 @@ "enum.createrailwaysnavigator.display_info_type.info.detailed": "Den viktigaste informationen med vissa detaljer kommer att visas, såsom tåghastighet, mellanstationer, osv.", "enum.createrailwaysnavigator.display_info_type.informative": "Informativ", "enum.createrailwaysnavigator.display_info_type.info.informative": "Visar all information som kan vara intressant och visar den i en snygg layout. Rekommenderas inte för små skärmar eftersom texten kan bli väldigt liten.", - "enum.createrailwaysnavigator.display_type": "Bildskärmstyp", "enum.createrailwaysnavigator.display_type.description": "Typen av din skärm som beror på deras syfte.", "enum.createrailwaysnavigator.display_type.train_destination": "Tågdestination", @@ -225,26 +206,110 @@ "enum.createrailwaysnavigator.display_type.info.passenger_information": "Representerar skärmarna som finns inuti tågen. Dessa displayer visar nästa stopp, utfartsriktningen och (om valt) tåghastighet och en ruttöversikt.", "enum.createrailwaysnavigator.display_type.platform": "Plattformsdisplay", "enum.createrailwaysnavigator.display_type.info.platform": "Dessa displayer bör användas på plattformar och perronger och visar nästa ankommande tåg med ytterligare detaljer om de väljs. Kan inte användas i tåg!", - "enum.createrailwaysnavigator.side": "Sida", "enum.createrailwaysnavigator.side.description": "Den sida av blocket där informationen ska återges.", "enum.createrailwaysnavigator.side.front": "Framsida", "enum.createrailwaysnavigator.side.info.front": "Informationen återges endast på framsidan. Detta är standardbeteendet.", "enum.createrailwaysnavigator.side.both": "Båda Sidor", "enum.createrailwaysnavigator.side.info.both": "Informationen kommer att återges på båda sidor.", - "enum.createrailwaysnavigator.time_display": "Tidsvisning", "enum.createrailwaysnavigator.time_display.description": "Bestämmer hur tiden ska visas.", "enum.createrailwaysnavigator.time_display.abs": "ABS", "enum.createrailwaysnavigator.time_display.info.abs": "ABS (visar klockslaget då fordonet ankommer)", "enum.createrailwaysnavigator.time_display.eta": "ETA", "enum.createrailwaysnavigator.time_display.info.eta": "ETA (visar fordonets beräknade ankomsttid)", - "create.display_source.advanced_display": "Avancerade Skärmar", "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width": "Tågnamnets kolumnbredd", "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description": "i blockpixlar. (Standard: 16)", "gui.createrailwaysnavigator.display_source.advanced_display.platform_width": "Plattformens kolumnbredd", "gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description": "i blockpixlar. (Standard: Auto)", - - "createrailwaysnavigator.moin": "moin" + "gui.createrailwaysnavigator.section_settings.title": "Sektionsinställningar", + "gui.createrailwaysnavigator.section_settings.train_groups": "Tilldela tåggrupp", + "gui.createrailwaysnavigator.section_settings.train_lines": "Tilldela tåglinje", + "gui.createrailwaysnavigator.section_settings.include_previous_station": "Inkludera start av nästa sektion", + "gui.createrailwaysnavigator.section_settings.usable": "Navigerbar", + "gui.createrailwaysnavigator.section_settings.none": "(Ingen)", + "createrailwaysnavigator.schedule.condition.dynamic_delay": "Dynamisk fördröjning", + "createrailwaysnavigator.schedule.condition.dynamic_delay.min_duration": "Minimal Varaktighet", + "createrailwaysnavigator.schedule.condition.dynamic_delay.title": "Vänta: %s..%s", + "createrailwaysnavigator.schedule.condition.dynamic_delay.at_least": "eller åtminstone %s", + "createrailwaysnavigator.schedule.instruction.travel_section": "Ny schemasektion", + "createrailwaysnavigator.schedule.instruction.travel_section.description": "Början av en ny schemasektion.", + "createrailwaysnavigator.schedule.instruction.travel_section.configure": "Hantera...", + "createrailwaysnavigator.schedule.instruction.travel_section.train_group": " - Tilldela tåggrupp: ", + "createrailwaysnavigator.schedule.instruction.travel_section.train_line": " - Tilldela Tåggrupp: ", + "createrailwaysnavigator.schedule.instruction.travel_section.include_previous_station": " - Inkludera start av nästa sektion: ", + "createrailwaysnavigator.schedule.instruction.travel_section.usable": " - Navigerbar: ", + "createrailwaysnavigator.schedule.instruction.reset_timings": "Återställ tiderna", + "display.createrailwaysnavigator.train_destination.simple": "Kompakt", + "display.createrailwaysnavigator.train_destination.extended": "Utökad", + "display.createrailwaysnavigator.train_destination.detailed": "Urspårad", + "display.createrailwaysnavigator.passenger_information.running_text": "Rullande Text", + "display.createrailwaysnavigator.passenger_information.detailed_with_schedule": "Detaljerad med Schema", + "display.createrailwaysnavigator.platform.running_text": "Rullande Text", + "display.createrailwaysnavigator.platform.table": "Tabell", + "display.createrailwaysnavigator.platform.focus": "Fokus", + "gui.createrailwaysnavigator.saved_routes.title": "Sparade rutter", + "gui.createrailwaysnavigator.schedule_board.title": "Schematavla", + "gui.createrailwaysnavigator.station_tags.title": "Inställningar För Stationstaggar", + "gui.createrailwaysnavigator.journey_info.title": "Reseinformation", + "gui.createrailwaysnavigator.journey_info.date": "Dag %s", + "gui.createrailwaysnavigator.journey_info.train": "%s (%s) till %s", + "gui.createrailwaysnavigator.color_picker.custom": "Anpassad...", + "gui.createrailwaysnavigator.color_picker.no_color": "Ingen färg", + "gui.createrailwaysnavigator.schedule_board.view_details": "Visa Detaljer", + "gui.createrailwaysnavigator.schedule_board.train_from": "från %s", + "gui.createrailwaysnavigator.search_options.departure_in": "Avgång om", + "gui.createrailwaysnavigator.search_options.train_groups": "Tåggrupper", + "gui.createrailwaysnavigator.search_options.transfer_time": "Bytestid", + "gui.createrailwaysnavigator.search_options.advanced_options": "Avancerade inställningar", + "gui.createrailwaysnavigator.search_options.train_groups.all": "Alla", + "gui.createrailwaysnavigator.search_options.train_groups.excluded": "%s exkluderad", + "gui.createrailwaysnavigator.search_options.saved_routes.all": "Alla", + "gui.createrailwaysnavigator.search_options.saved_routes.excluded": "%s exkluderad", + "gui.createrailwaysnavigator.empty_list": "Listan är tom", + "gui.createrailwaysnavigator.new_entry.add": "Lägg till ny post", + "gui.createrailwaysnavigator.new_entry.new": "Ny:", + "gui.createrailwaysnavigator.saved_routes.saved": "%s sparad", + "gui.createrailwaysnavigator.route_overview.notification.schedule_changed.title": "Schemat har ändrats!", + "gui.createrailwaysnavigator.route_overview.notification.schedule_changed": "Schemat för din sparade rutt har ändrats. Vänligen kolla navigatorn för dessa ändringar.", + "gui.createrailwaysnavigator.route_overview.transfers": "%s Byten", + "gui.createrailwaysnavigator.route_overview.cancelled": "Inställd", + "gui.createrailwaysnavigator.saved_routes.saved_route": "Sparad Rutt", + "block.createrailwaysnavigator.advanced_display.ber.arrival": "Ankomst", + "block.createrailwaysnavigator.advanced_display.ber.cancelled": "Inställd", + "block.createrailwaysnavigator.advanced_display.ber.delayed": "Försening cirka %s minuter", + "block.createrailwaysnavigator.advanced_display.ber.information_about_cancelled": "Information om %s: Detta tåget blev inställt", + "block.createrailwaysnavigator.advanced_display.ber.information_about_delayed": "Information om %s: Försening cirka %s minuter", + "block.createrailwaysnavigator.advanced_display.ber.cancelled2": ", är inställd idag. Vi ber om ursäkt för besväret.", + "block.createrailwaysnavigator.advanced_display.ber.delayed2": ", idag cirka %s minuter försenad.", + "block.createrailwaysnavigator.advanced_display.ber.reason": "Anledning: ", + "gui.createrailwaysnavigator.route_widget.show_details": "Visa detaljer", + "gui.createrailwaysnavigator.route_widget.save": "Spara", + "gui.createrailwaysnavigator.route_widget.remove": "Ta bort", + "gui.createrailwaysnavigator.route_widget.share": "Dela...", + "gui.createrailwaysnavigator.saved_routes.in_the_past": "Förr i tiden", + "gui.createrailwaysnavigator.saved_routes.today": "Idag", + "gui.createrailwaysnavigator.saved_routes.tomorrow": "Imorgon", + "gui.createrailwaysnavigator.saved_routes.in_days": "Om %s dagar", + "gui.createrailwaysnavigator.saved_route_widget.show_details": "Visa detaljer", + "gui.createrailwaysnavigator.saved_route_widget.share": "Dela...", + "gui.createrailwaysnavigator.saved_route_widget.notifications": "Visa Notifikationer", + "gui.createrailwaysnavigator.train_status.unknown_delay": "Driftförsening", + "gui.createrailwaysnavigator.train_status.delay_previous_journey": "Försening i förra resan", + "gui.createrailwaysnavigator.train_status.red_signal": "Röd signal", + "gui.createrailwaysnavigator.train_status.priority_other_train": "Prioritet för ett annat tåg", + "gui.createrailwaysnavigator.train_status.delay_other_train": "Försening av ett annat tåg", + "gui.createrailwaysnavigator.train_status.track_closed": "Spår avstängt", + "gui.createrailwaysnavigator.train_status.staff_shortage": "Personalbrist", + "gui.createrailwaysnavigator.train_status.operational_disruption": "Driftstörning", + "gui.createrailwaysnavigator.train_status.special_trip": "Specialresa", + "gui.createrailwaysnavigator.route_details.save_route.tooltip": "Spara rutt", + "gui.createrailwaysnavigator.route_details.remove_route.tooltip": "Radera rutt", + "gui.createrailwaysnavigator.route_details.show_popup.tooltip": "Visa Popup", + "gui.createrailwaysnavigator.navigator.my_profile": "Min Profil", + "gui.createrailwaysnavigator.navigator.train_initialization_warning": "Vissa rutter kan vara ofullständiga eller inte föreslagna alls eftersom att Create Järnvägsnavigatorn inte har initialiserat alla tåg ännu.", + "gui.createrailwaysnavigator.global_settings.train_line.title": "Tåglinjer", + "gui.createrailwaysnavigator.global_settings.train_line.color": "Välj färg", + "gui.createrailwaysnavigator.global_settings.train_line.description": "Skapa tåglinjer för att gruppera olika tåg tillsammans, skriv över deras visningsnamn och justera andra inställningar för varje linje. (Kan endast bli tilldelad till tågen i schemat)" } diff --git a/common/src/main/resources/assets/createrailwaysnavigator/lang/sxu.json b/common/src/main/resources/assets/createrailwaysnavigator/lang/sxu.json index e1d8537b..4de46c0a 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/lang/sxu.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/lang/sxu.json @@ -3,56 +3,51 @@ "advancement.createrailwaysnavigator.navigator.description": "Schdelle enen Wegweesr her, um Zuhchferbindungn zwischn zwee färschiednen Boahnhöfn ze findn.", "advancement.createrailwaysnavigator.advanced_display": "Ne ganz 4goa", "advancement.createrailwaysnavigator.advanced_display.description": "forbessere deene Anzeichedafl, um mehr Informadschionen darzeschdellen und se sogoar uf Zühchn ze ferwen'n.", - - "itemGroup.createrailwaysnavigator.tab": "Create Railways Navigator", - "item.createrailwaysnavigator.navigator": "Create Railways Navigator", - "item.createrailwaysnavigator.navigator.tooltip.summary": "Dor _Wegweesr_ zeichd möchliche _Zuhchforbindungn_ midd zusädslichn Informadschionen, wie _Zwischenhalde_, _Echdzeiddaden_ und mehr", - + "item.createrailwaysnavigator.navigator.tooltip.summary": "Dor _Wegweesr_ zeichd möchliche _Zuhchforbindungn_ midd zusädslichn Informadschionen, wie _Zwischenhalde_, _Echdzeiddaden_ und mehr", "block.createrailwaysnavigator.train_station_clock": "Boahnhofsuhr", "block.createrailwaysnavigator.advanced_display_block": "Forbessorrdor Anzeichn-Blogg", - "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "Benuddse dä Blogg uf _Zühchn_ als _Zuhchzielanzeiche_ odorr _Foahrgassdinformadschionsanzeichn_ odorr an _Boahnhöfn_ als forbesserrde _Bahnschdeichanzeichn_, die och mehr Informadschionen anzeichn als normale Anzeichedofln.", + "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "Benuddse dä Blogg uf _Zühchn_ als _Zuhchzielanzeiche_ odorr _Foahrgassdinformadschionsanzeichn_ odorr an _Boahnhöfn_ als forbesserrde _Bahnschdeichanzeichn_, die och mehr Informadschionen anzeichn als normale Anzeichedofln.", "block.createrailwaysnavigator.advanced_display_block.tooltip.condition1": "R-Gligg midd nem Schraubnschlüssl", - "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "Öffne ä _Menü_, um dä Anzeichn ze _gonfiguriern_.", + "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "Öffne ä _Menü_, um dä Anzeichn ze _gonfiguriern_.", "block.createrailwaysnavigator.advanced_display": "Forbessorrde Anzeichedoafl", - "block.createrailwaysnavigator.advanced_display.tooltip.summary": "Benuddse dä Blogg uf _Zühchn_ als _Zuhchzielanzeiche_ odorr _Foahrgassdinformadschionsanzeichn_ odorr an _Boahnhöfn_ als forbesserrde _Bahnschdeichanzeichn_, die och mehr Informadschionen anzeichn als normale Anzeichedofln.", + "block.createrailwaysnavigator.advanced_display.tooltip.summary": "Benuddse dä Blogg uf _Zühchn_ als _Zuhchzielanzeiche_ odorr _Foahrgassdinformadschionsanzeichn_ odorr an _Boahnhöfn_ als forbesserrde _Bahnschdeichanzeichn_, die och mehr Informadschionen anzeichn als normale Anzeichedofln.", "block.createrailwaysnavigator.advanced_display.tooltip.condition1": "R-Gligg midd nem Schraubnschlüssl", - "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "Öffne ä _Menü_, um dä Anzeichn ze _gonfiguriern_.", + "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "Öffne ä _Menü_, um dä Anzeichn ze _gonfiguriern_.", "block.createrailwaysnavigator.advanced_display_small": "Gleene forbessorrde Anzeichedofl", - "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "Benuddse dä Blogg uf _Zühchn_ als _Zuhchzielanzeiche_ odorr _Foahrgassdinformadschionsanzeichn_ odorr an _Boahnhöfn_ als forbesserrde _Bahnschdeichanzeichn_, die och mehr Informadschionen anzeichn als normale Anzeichedofln.", + "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "Benuddse dä Blogg uf _Zühchn_ als _Zuhchzielanzeiche_ odorr _Foahrgassdinformadschionsanzeichn_ odorr an _Boahnhöfn_ als forbesserrde _Bahnschdeichanzeichn_, die och mehr Informadschionen anzeichn als normale Anzeichedofln.", "block.createrailwaysnavigator.advanced_display_small.tooltip.condition1": "R-Gligg midd nem Schraubnschlüssl", - "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "Öffne ä _Menü_, um dä Anzeichn ze _gonfiguriern_.", + "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "Öffne ä _Menü_, um dä Anzeichn ze _gonfiguriern_.", "block.createrailwaysnavigator.advanced_display_panel": "Forbessorrdes Anzeichebännl", - "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "Benuddse dä Blogg uf _Zühchn_ als _Zuhchzielanzeiche_ odorr _Foahrgassdinformadschionsanzeichn_ odorr an _Boahnhöfn_ als forbesserrde _Bahnschdeichanzeichn_, die och mehr Informadschionen anzeichn als normale Anzeichedofln.", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "Benuddse dä Blogg uf _Zühchn_ als _Zuhchzielanzeiche_ odorr _Foahrgassdinformadschionsanzeichn_ odorr an _Boahnhöfn_ als forbesserrde _Bahnschdeichanzeichn_, die och mehr Informadschionen anzeichn als normale Anzeichedofln.", "block.createrailwaysnavigator.advanced_display_panel.tooltip.condition1": "R-Gligg midd nem Schraubnschlüssl", - "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "Öffne ä _Menü_, um dä Anzeichn ze _gonfiguriern_.", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "Öffne ä _Menü_, um dä Anzeichn ze _gonfiguriern_.", "block.createrailwaysnavigator.advanced_display_half_panel": "Halbes Forbessorrdes Anzeichebännl", - "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "Benuddse dä Blogg uf _Zühchn_ als _Zuhchzielanzeiche_ odorr _Foahrgassdinformadschionsanzeichn_ odorr an _Boahnhöfn_ als forbesserrde _Bahnschdeichanzeichn_, die och mehr Informadschionen anzeichn als normale Anzeichedofln.", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "Benuddse dä Blogg uf _Zühchn_ als _Zuhchzielanzeiche_ odorr _Foahrgassdinformadschionsanzeichn_ odorr an _Boahnhöfn_ als forbesserrde _Bahnschdeichanzeichn_, die och mehr Informadschionen anzeichn als normale Anzeichedofln.", "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.condition1": "R-Gligg midd nem Schraubnschlüssl", - "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "Öffne ä _Menü_, um dä Anzeichn ze _gonfiguriern_.", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "Öffne ä _Menü_, um dä Anzeichn ze _gonfiguriern_.", "block.createrailwaysnavigator.advanced_display_sloped": "Schrääsche forbessorrde Anzeichedofl", - "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "Benuddse dä Blogg uf _Zühchn_ als _Zuhchzielanzeiche_ odorr _Foahrgassdinformadschionsanzeichn_ odorr an _Boahnhöfn_ als forbesserrde _Bahnschdeichanzeichn_, die och mehr Informadschionen anzeichn als normale Anzeichedofln.", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "Benuddse dä Blogg uf _Zühchn_ als _Zuhchzielanzeiche_ odorr _Foahrgassdinformadschionsanzeichn_ odorr an _Boahnhöfn_ als forbesserrde _Bahnschdeichanzeichn_, die och mehr Informadschionen anzeichn als normale Anzeichedofln.", "block.createrailwaysnavigator.advanced_display_sloped.tooltip.condition1": "R-Gligg midd nem Schraubnschlüssl", - "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "Öffne ä _Menü_, um dä Anzeichn ze _gonfiguriern_.", - + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "Öffne ä _Menü_, um dä Anzeichn ze _gonfiguriern_.", + "block.createrailwaysnavigator.advanced_display_slab": "Forbessorde Anzeicheschdufe", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.summary": "Benuddse dä Blogg uf _Zühchn_ als _Zuhchzielanzeiche_ odorr _Foahrgassdinformadschionsanzeichn_ odorr an _Boahnhöfn_ als forbesserrde _Bahnschdeichanzeichn_, die och mehr Informadschionen anzeichn als normale Anzeichedofln.", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.condition1": "R-Gligg midd nem Schraubnschlüssl", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.behaviour1": "Öffne ä _Menü_, um dä Anzeichn ze _gonfiguriern_.", "block.createrailwaysnavigator.advanced_display.ber.not_in_service": "Beddriebschfoahrd", - "category.createrailwaysnavigator.crn": "Create Railways Navigator", "key.createrailwaysnavigator.route_overlay_options": "Schdreggnanzeiche Eenschdellungn", - "enum.createrailwaysnavigator.overlay_position": "Anzeichebosiddsion", "enum.createrailwaysnavigator.overlay_position.info.top_left": "Egge ob'n lings", "enum.createrailwaysnavigator.overlay_position.info.top_right": "Egge ob'n reschds", "enum.createrailwaysnavigator.overlay_position.info.bottom_left": "Egge und'n lings", "enum.createrailwaysnavigator.overlay_position.info.bottom_right": "Egge und'n reschds", - "gui.createrailwaysnavigator.loading.title": "Dodai'n wer'n herundorgeladn...", - "gui.createrailwaysnavigator.overlay_settings.title": "Schdreggnanzeiche Eenschdellungn", "gui.createrailwaysnavigator.route_overlay_settings.show_details": "Deddails anzeichn", "gui.createrailwaysnavigator.route_overlay_settings.unpin": "Anzeiche endfernn", "gui.createrailwaysnavigator.route_overlay_settings.narrator.on": "Orrzählerangündschung'n aggdiwierd.", - "gui.createrailwaysnavigator.route_overlay_settings.narrator.off": "Orrzählerangündschungn deaggdiwierd.", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.off": "Orrzählerangündschungn deaggdiwierd.", "gui.createrailwaysnavigator.route_overlay_settings.notifications.on": "Benoochrischdschung'n aggdiwierd.", "gui.createrailwaysnavigator.route_overlay_settings.notifications.off": "Benoochrischdschung'n deaggdiwierd.", "gui.createrailwaysnavigator.route_overlay_settings.scale": "Benuddsoroberflächenschgallierung", @@ -60,7 +55,6 @@ "gui.createrailwaysnavigator.route_overlay_settings.narrator.description": "Dor Orrzähler günndschd wichdsche Ereichnisse uf dener Schdregge an, z.B. dorr nächsde Hald.", "gui.createrailwaysnavigator.route_overlay_settings.notifications": "Benoochrischdschung'n", "gui.createrailwaysnavigator.route_overlay_settings.notifications.description": "Orhallde Benoochrischdschung'n in Form fonn Bob-Abbs ze wichdschn Oreichnissen, z.B. Forschbädung'n", - "gui.createrailwaysnavigator.common.expand": "Deddails anzeichn", "gui.createrailwaysnavigator.common.collapse": "Deddails Ferbärchn", "gui.createrailwaysnavigator.common.go_back": "Zorigge", @@ -72,8 +66,9 @@ "gui.createrailwaysnavigator.common.search": "Suchn", "gui.createrailwaysnavigator.common.auto": "Audom.", "gui.createrailwaysnavigator.common.server_error": "Fehlor beim Ausführn dor Ufgobe. Schau in de Servergonsole.", - "gui.createrailwaysnavigator.via": "übor", - + "gui.createrailwaysnavigator.common.delete": "Löschn", + "gui.createrailwaysnavigator.common.add": "Hinzufieschn", + "gui.createrailwaysnavigator.common.help": "Hilfe holn", "gui.createrailwaysnavigator.navigator.title": "Create Railways Navigator", "gui.createrailwaysnavigator.navigator.no_connections": "Geene Forbindung'n gefund'n.", "gui.createrailwaysnavigator.navigator.not_searched": "Bisher nüschd gesuchd.", @@ -88,14 +83,12 @@ "gui.createrailwaysnavigator.navigator.search_settings.tooltip": "Sucheenschdellungn", "gui.createrailwaysnavigator.navigator.search.tooltip": "Suchn", "gui.createrailwaysnavigator.navigator.location.tooltip": "Nächschdgelech'ne Schdadschion fonn aggduellor Bosidschsion", + "gui.createrailwaysnavigator.navigator.refresh.tooltip": "Aggdualisiere", "gui.createrailwaysnavigator.navigator.switch.tooltip": "Eingabn dauschn", - "gui.createrailwaysnavigator.route_details.title": "Schdreggendeddails", "gui.createrailwaysnavigator.route_details.departure": "Abfohrd in", "gui.createrailwaysnavigator.route_details.next_transfer_time": "Umschdiech in", "gui.createrailwaysnavigator.route_details.transfer": "Umschdiech", - "gui.createrailwaysnavigator.route_details.save_route": "Schdregge sbeichorn", - "gui.createrailwaysnavigator.route_overview.title": "Schdreggendeddails", "gui.createrailwaysnavigator.route_overview.journey_begins": "Ihre Reise beginnd! %s nooch %s, Abfohrd %s", "gui.createrailwaysnavigator.route_overview.journey_begins_with_platform": "Ihre Reise beginnd! %s nooch %s, Abfohrd %s fonn Gleis %s", @@ -138,7 +131,6 @@ "gui.createrailwaysnavigator.route_overview.notification.journey_completed.title": "Se hamm Ihr Ziel erreischd!", "gui.createrailwaysnavigator.route_overview.notification.journey_completed": "Wir bedangn uns für Ihre Reise und wünschen nen schönen Dahch.", "gui.createrailwaysnavigator.route_overview.date": "Dahch %s, %s", - "gui.createrailwaysnavigator.global_settings.title": "Globoale Eenschdellungn", "gui.createrailwaysnavigator.global_settings.option.tooltip": "Zum Beoarbeidn gliggn", "gui.createrailwaysnavigator.global_settings.option_alias.title": "Boahnhof Dägs", @@ -149,33 +141,28 @@ "gui.createrailwaysnavigator.global_settings.train_group.description": "Zuhchgaddegorien dienen dorr Organisadsion fonn Zühchn (z.B. Regionalforgehr, Fernforgehr, ...). Nudzer gönn'n nooch diesen Gadegorien fildorn.", "gui.createrailwaysnavigator.global_settings.train_blacklist.title": "Zuhch Blägglisd", "gui.createrailwaysnavigator.global_settings.train_blacklist.description": "Schließe Zühche aus, z.B. Güdorzühche, Sonderzühche, edc., damidd diese ne in'dn Forschlächn Ufdauchn.", - - "gui.createrailwaysnavigator.station_tags.title": "Boahnhof Dägs Eenschdellungn", "gui.createrailwaysnavigator.station_tags.summary": "Endhäld %s Schdadsionen", "gui.createrailwaysnavigator.station_tags.editor": "Z'ledsd fonn %s am %s beoarbeided", "gui.createrailwaysnavigator.station_tags.add.tooltip": "Neuen Eindrahch erschdelln", "gui.createrailwaysnavigator.station_tags.delete_alias.tooltip": "Dahch löschn", "gui.createrailwaysnavigator.station_tags.delete_station.tooltip": "Schdadschion endfernn", + "gui.createrailwaysnavigator.station_tags.modify_platform.tooltip": "Gligg zum ändorn", "gui.createrailwaysnavigator.station_tags.add_station.tooltip": "Schdadschion hinzufüchn", "gui.createrailwaysnavigator.station_tags.hint.station_name": "Boahnhofsname", "gui.createrailwaysnavigator.station_tags.hint.platform": "Gleisbezeichnung", "gui.createrailwaysnavigator.station_tags.enter_name": "Name eingeb'n", - "gui.createrailwaysnavigator.train_group_settings.title": "Zuhchgaddegorien Eenschdellungn", "gui.createrailwaysnavigator.train_group_settings.summary": "Endhäld %s Zühche", "gui.createrailwaysnavigator.train_group_settings.editor": "Z'ledsd fonn %s am %s beoarbeided", "gui.createrailwaysnavigator.train_group_settings.delete_alias.tooltip": "Gaddegorie löschn", "gui.createrailwaysnavigator.train_group_settings.delete_station.tooltip": "Zuhch endfernn", "gui.createrailwaysnavigator.train_group_settings.add_station.tooltip": "Zuhch hinzufüchn", - "gui.createrailwaysnavigator.blacklist.title": "Boahnhof Blägglisd", "gui.createrailwaysnavigator.blacklist.add.tooltip": "Zur Blägglisd hinzufüchn", "gui.createrailwaysnavigator.blacklist.delete.tooltip": "Fonn Blägglisd endfernn", - "gui.createrailwaysnavigator.train_blacklist.title": "Zuhch Blägglisd", "gui.createrailwaysnavigator.train_blacklist.add.tooltip": "Zur Blägglisd hinzufüchn", "gui.createrailwaysnavigator.train_blacklist.delete.tooltip": "Fonn Blägglisd endfernn", - "gui.createrailwaysnavigator.search_settings.title": "Sucheenschdellungn", "gui.createrailwaysnavigator.search_settings.transfer_time": "Minimale Umschdiechszeid", "gui.createrailwaysnavigator.search_settings.transfer_time.description": "Die minimale Zeid für nen Umschdiech. (1h ~ 50 Real Life Seggundn)", @@ -185,28 +172,24 @@ "gui.createrailwaysnavigator.search_settings.train_groups.overview.all": "Alle", "gui.createrailwaysnavigator.search_settings.train_groups.overview.none": "Geene", "gui.createrailwaysnavigator.search_settings.train_groups.tooltip.reset": "Fildor zoriggesedsn", - "gui.createrailwaysnavigator.new_text_entry.add.tooltip": "Hinzufieschn", - "gui.createrailwaysnavigator.time": "Zeid: %s", "gui.createrailwaysnavigator.time.now": "nu", "gui.createrailwaysnavigator.time_format.dhm": "%s Dahche %s Schd. %s min.", "gui.createrailwaysnavigator.time_format.hm": "%s Schd. %s min.", "gui.createrailwaysnavigator.time_format.m": "%s min.", - "gui.createrailwaysnavigator.platform": "Gleis", "gui.createrailwaysnavigator.departure": "Abfohrd", "gui.createrailwaysnavigator.destination": "Ziel", "gui.createrailwaysnavigator.line": "Linie", "gui.createrailwaysnavigator.following_trains": "Folgezühche:", - + "gui.createrailwaysnavigator.via": "übor", "gui.createrailwaysnavigator.advanced_display_settings.title": "Forbessorrde Anzeiche Eenschdellungn", "gui.createrailwaysnavigator.advanced_display_settings.display_type": "Anzeichedühb", "gui.createrailwaysnavigator.advanced_display_settings.display_type.description": "Die Informadschionen, die angezeichd wer'n solln.", "gui.createrailwaysnavigator.advanced_display_settings.info_type": "Informadschionsard", "gui.createrailwaysnavigator.advanced_display_settings.info_type.description": "Gibd an, wie dedallierd dä Informadschionen sind.", "gui.createrailwaysnavigator.advanced_display_settings.double_sided": "Beidseidsch", - "enum.createrailwaysnavigator.display_info_type": "Informadschionsard", "enum.createrailwaysnavigator.display_info_type.description": "Gibd an, wie fiele Informadschionen dargeschdelld wer'n solln.", "enum.createrailwaysnavigator.display_info_type.simple": "Eefach", @@ -215,7 +198,6 @@ "enum.createrailwaysnavigator.display_info_type.info.detailed": "Die wichdigsdn Informadschionen midd einichen Deddails, wie z.B Zwischenhalde.", "enum.createrailwaysnavigator.display_info_type.informative": "Informaddief", "enum.createrailwaysnavigator.display_info_type.info.informative": "Zeichd alle Informadschionen, die relewand sein gönn'n, und schdelld sie möchlichsd anschaulich dar. Ne für gleene Anzeichn embfohlen.", - "enum.createrailwaysnavigator.display_type": "Anzeichedühb", "enum.createrailwaysnavigator.display_type.description": "Die Ard dorr Anzeiche, was fonn ihr'm Zwegg abhängd.", "enum.createrailwaysnavigator.display_type.train_destination": "Zuhchzielanzeiche", @@ -224,26 +206,110 @@ "enum.createrailwaysnavigator.display_type.info.passenger_information": "Rebräsendiern dä Anzeichn, die in Zühchn forgomm'n. Dargeschdelld wer'n dorr nächsde Hald, die Ausschdiechsseide und (je nooch Eenschdellung) noch weidere Informadschionen.", "enum.createrailwaysnavigator.display_type.platform": "Bahnschdeichsanzeiche", "enum.createrailwaysnavigator.display_type.info.platform": "Diese Anzeichn wer'n an Bahnschdeichn ferwend' und zeichen dä nächsden abfahrnden Zühche midd zusädslichn Informadschionen an. Fungdschionierd ne uf Zühchn!", - "enum.createrailwaysnavigator.side": "Seidde", "enum.createrailwaysnavigator.side.description": "Die Seidde des Bloggs, uf dem de Informadschionen angezeichd wer'n solln.", "enum.createrailwaysnavigator.side.front": "Forderseidde", "enum.createrailwaysnavigator.side.info.front": "Die Informadschionen wer'n nur uf dorr Forderseidde dargeschdelld.", "enum.createrailwaysnavigator.side.both": "Beidseidsch", "enum.createrailwaysnavigator.side.info.both": "Die Informadschionen wer'n uf beidn Seiddn dargeschdelld.", - "enum.createrailwaysnavigator.time_display": "Zeidanzeiche", "enum.createrailwaysnavigator.time_display.description": "Gibd an, in welchm Formad dä Zeid angegebn wird.", "enum.createrailwaysnavigator.time_display.abs": "ABS", "enum.createrailwaysnavigator.time_display.info.abs": "ABS (Absolud)", "enum.createrailwaysnavigator.time_display.eta": "ETA", "enum.createrailwaysnavigator.time_display.info.eta": "ETA (Geschädsde Angunfdszeid)", - "create.display_source.advanced_display": "Forbessorrde Anzeiche", "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width": "Zuhchname Schbaldnbreide", "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description": "Dä Breide dorr Schbalde für'n Zuhchname in Biggsl. (Schdandard: 16)", "gui.createrailwaysnavigator.display_source.advanced_display.platform_width": "Gleis Schbaldnbreide", "gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description": "Die Breide dorr Schbalde für's Gleis in Biggsl. (-1 = Audom., Schdandard: -1)", - - "createrailwaysnavigator.moin": "Dahch fonn Schdeffn" + "gui.createrailwaysnavigator.section_settings.title": "Abbschniddseenschdellungen", + "gui.createrailwaysnavigator.section_settings.train_groups": "Zuchgrubbe zuweisn", + "gui.createrailwaysnavigator.section_settings.train_lines": "Zuchlinie zuweisn", + "gui.createrailwaysnavigator.section_settings.include_previous_station": "Schdoardd des näschsdn Bereischs einbinden", + "gui.createrailwaysnavigator.section_settings.usable": "Weechweesboar", + "gui.createrailwaysnavigator.section_settings.none": "(Geene)", + "createrailwaysnavigator.schedule.condition.dynamic_delay": "Dinnamische Forzöscherung", + "createrailwaysnavigator.schedule.condition.dynamic_delay.min_duration": "Mindesworddezeid", + "createrailwaysnavigator.schedule.condition.dynamic_delay.title": "Wordde: %s..%s", + "createrailwaysnavigator.schedule.condition.dynamic_delay.at_least": "odor mindeschdens %s", + "createrailwaysnavigator.schedule.instruction.travel_section": "Neuer Foahrblanabschnidd", + "createrailwaysnavigator.schedule.instruction.travel_section.description": "Anfang eenes neuen Foahrblanabschnidd.", + "createrailwaysnavigator.schedule.instruction.travel_section.configure": "Gonfigurieren...", + "createrailwaysnavigator.schedule.instruction.travel_section.train_group": " - Seddse Zuchgaddegorie: ", + "createrailwaysnavigator.schedule.instruction.travel_section.train_line": " - Seddse Zuchgaddegorie: ", + "createrailwaysnavigator.schedule.instruction.travel_section.include_previous_station": " - Schdoardd des näschsdn Bereischs einbinden: ", + "createrailwaysnavigator.schedule.instruction.travel_section.usable": " - Weechweesboar: ", + "createrailwaysnavigator.schedule.instruction.reset_timings": "Zeiddn zoriggeseddsn", + "display.createrailwaysnavigator.train_destination.simple": "Gommbaggd", + "display.createrailwaysnavigator.train_destination.extended": "Erweidord", + "display.createrailwaysnavigator.train_destination.detailed": "Deddallierd", + "display.createrailwaysnavigator.passenger_information.running_text": "Loofdeggsd", + "display.createrailwaysnavigator.passenger_information.detailed_with_schedule": "Deddallierd mid Foahrblan", + "display.createrailwaysnavigator.platform.running_text": "Loofdeggsd", + "display.createrailwaysnavigator.platform.table": "Dabelle", + "display.createrailwaysnavigator.platform.focus": "Foggussierd", + "gui.createrailwaysnavigator.saved_routes.title": "Geschbeichorde Reisen", + "gui.createrailwaysnavigator.schedule_board.title": "Abfoahrdenlisdde", + "gui.createrailwaysnavigator.station_tags.title": "Boahnhof Dägs Eenschdellungn", + "gui.createrailwaysnavigator.journey_info.title": "Reiseinformadschonen", + "gui.createrailwaysnavigator.journey_info.date": "Dach %s", + "gui.createrailwaysnavigator.journey_info.train": "%s (%s) noach %s", + "gui.createrailwaysnavigator.color_picker.custom": "Benuddserdefinieord...", + "gui.createrailwaysnavigator.color_picker.no_color": "Geene Farbe", + "gui.createrailwaysnavigator.schedule_board.view_details": "Deddails ansehen", + "gui.createrailwaysnavigator.schedule_board.train_from": "fonn %s", + "gui.createrailwaysnavigator.search_options.departure_in": "Abfohrd in", + "gui.createrailwaysnavigator.search_options.train_groups": "Zuhchgaddegorien", + "gui.createrailwaysnavigator.search_options.transfer_time": "Umschdiech in", + "gui.createrailwaysnavigator.search_options.advanced_options": "Erweidorrde Obschonen", + "gui.createrailwaysnavigator.search_options.train_groups.all": "Alle", + "gui.createrailwaysnavigator.search_options.train_groups.excluded": "%s ausgeschlossn", + "gui.createrailwaysnavigator.search_options.saved_routes.all": "Alle", + "gui.createrailwaysnavigator.search_options.saved_routes.excluded": "%s ausgeschlossn", + "gui.createrailwaysnavigator.empty_list": "De Lisde is leer", + "gui.createrailwaysnavigator.new_entry.add": "Neuen Eindrach hinzufieschn", + "gui.createrailwaysnavigator.new_entry.new": "Neu:", + "gui.createrailwaysnavigator.saved_routes.saved": "%s geschbeischord", + "gui.createrailwaysnavigator.route_overview.notification.schedule_changed.title": "Foahrzeidn geändorrd!", + "gui.createrailwaysnavigator.route_overview.notification.schedule_changed": "De Foahrzeidn eenor geschbeischorrdn Schdregge hamm sich geändorrd. Bidde informieren se sich im Weechweesor übor diese Änderungen.", + "gui.createrailwaysnavigator.route_overview.transfers": "%s Umschdieche", + "gui.createrailwaysnavigator.route_overview.cancelled": "Fälld aus", + "gui.createrailwaysnavigator.saved_routes.saved_route": "Geschbeichorde Reisen", + "block.createrailwaysnavigator.advanced_display.ber.arrival": "Angunnfd", + "block.createrailwaysnavigator.advanced_display.ber.cancelled": "Fälld aus", + "block.createrailwaysnavigator.advanced_display.ber.delayed": "Forschbädschung za. %s Minudn", + "block.createrailwaysnavigator.advanced_display.ber.information_about_cancelled": "Informadschonen übor %s: Fälld heude aus", + "block.createrailwaysnavigator.advanced_display.ber.information_about_delayed": "Informadschonen übor %s: Forschbädschung za. %s Minudn", + "block.createrailwaysnavigator.advanced_display.ber.cancelled2": ", fälld heude aus. Wir Biddn um Enschuldschung.", + "block.createrailwaysnavigator.advanced_display.ber.delayed2": ", heude za. %s Minudn schbädorr.", + "block.createrailwaysnavigator.advanced_display.ber.reason": "Grund: ", + "gui.createrailwaysnavigator.route_widget.show_details": "Deddails ansehen", + "gui.createrailwaysnavigator.route_widget.save": "Schbeischorn", + "gui.createrailwaysnavigator.route_widget.remove": "Nimmer schbeischorn", + "gui.createrailwaysnavigator.route_widget.share": "Deilen...", + "gui.createrailwaysnavigator.saved_routes.in_the_past": "In dorr Forrgangenheid", + "gui.createrailwaysnavigator.saved_routes.today": "Heude", + "gui.createrailwaysnavigator.saved_routes.tomorrow": "Morschn", + "gui.createrailwaysnavigator.saved_routes.in_days": "In %s Dachn", + "gui.createrailwaysnavigator.saved_route_widget.show_details": "Deddails anzeichn", + "gui.createrailwaysnavigator.saved_route_widget.share": "Deilen...", + "gui.createrailwaysnavigator.saved_route_widget.notifications": "Benoochrischdschung'n anzeischn", + "gui.createrailwaysnavigator.train_status.unknown_delay": "Forrzöscherung'n im Beddriebsablauf", + "gui.createrailwaysnavigator.train_status.delay_previous_journey": "Forschbädung aus forhährscher Foahrd", + "gui.createrailwaysnavigator.train_status.red_signal": "Rodes Signoal", + "gui.createrailwaysnavigator.train_status.priority_other_train": "Forfoahrd eenes andorren Zuches", + "gui.createrailwaysnavigator.train_status.delay_other_train": "Forschbädung eenes forausfoahrenden Zuches", + "gui.createrailwaysnavigator.train_status.track_closed": "Schdregge geschberrd", + "gui.createrailwaysnavigator.train_status.staff_shortage": "Bersonalausfall", + "gui.createrailwaysnavigator.train_status.operational_disruption": "Bedriebsschdörung", + "gui.createrailwaysnavigator.train_status.special_trip": "Sondorfoahrd", + "gui.createrailwaysnavigator.route_details.save_route.tooltip": "Reise schbeischorn", + "gui.createrailwaysnavigator.route_details.remove_route.tooltip": "Reise nimmer schbeischorn", + "gui.createrailwaysnavigator.route_details.show_popup.tooltip": "Bobub-Fenschdorr anzeichn", + "gui.createrailwaysnavigator.navigator.my_profile": "Mein Brofil", + "gui.createrailwaysnavigator.navigator.train_initialization_warning": "Mansche Schdreggen gönn'n unvollschdänsch sein oder überhaubt ne vorgeschlagn wer'n, da Create Railways Navigator noch ne alle Züche inidschialisierd had.", + "gui.createrailwaysnavigator.global_settings.train_line.title": "Zuchlinien", + "gui.createrailwaysnavigator.global_settings.train_line.color": "Farbe auswähln", + "gui.createrailwaysnavigator.global_settings.train_line.description": "Errschdelle Linien, um mehrere Züche zu Linienzüchn zusammezufassen, deren Anzeichename zu üborschreiben oder um weidorre Eenschdellungen anzebassen. (Gann nur im Foahrplan zugewiesn werden)" } diff --git a/common/src/main/resources/assets/createrailwaysnavigator/lang/uk_ua.json b/common/src/main/resources/assets/createrailwaysnavigator/lang/uk_ua.json new file mode 100644 index 00000000..cd98f5e8 --- /dev/null +++ b/common/src/main/resources/assets/createrailwaysnavigator/lang/uk_ua.json @@ -0,0 +1,315 @@ +{ + "advancement.createrailwaysnavigator.navigator": "Дякуємо за подорож", + "advancement.createrailwaysnavigator.navigator.description": "Створіть Навігатор для пошуку залізничних сполучень від однієї станції до іншої.", + "advancement.createrailwaysnavigator.advanced_display": "Майже 4k", + "advancement.createrailwaysnavigator.advanced_display.description": "Оновіть свої інформаційні табло, щоб вони показували більше інформації, і навіть розмістіть їх у потягах.", + "item.createrailwaysnavigator.navigator": "Створіть Залізничний Навігатор", + "item.createrailwaysnavigator.navigator.tooltip.summary": "_Навігатор_ показує можливі _залізничні сполучення_ з додатковою інформацією, такою як _зупинки_, _дані в реальному часі_ та інше.", + "block.createrailwaysnavigator.train_station_clock": "Годинник Залізничної станції", + "block.createrailwaysnavigator.advanced_display_block": "Розширений Блок Дисплею", + "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "Використовуйте його у _поїздах_ як _дисплей призначення поїзда_ або _інформаційний дисплей для пасажирів_, або на _залізничних станціях_ як _покращені платформні дисплеї_, які також показують більше інформації, ніж звичайні табло.", + "block.createrailwaysnavigator.advanced_display_block.tooltip.condition1": "Натискаючи ПКМ за допомогою Гайкового ключа", + "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "Відкрийте меню щоб _налаштувати_ _табло_.", + "block.createrailwaysnavigator.advanced_display": "Розширене Табло Дисплею", + "block.createrailwaysnavigator.advanced_display.tooltip.summary": "Використовуйте його у _поїздах_ як _дисплей призначення поїзда_ або _інформаційний дисплей для пасажирів_, або на _залізничних станціях_ як _покращені платформні дисплеї_, які також показують більше інформації, ніж звичайні табло.", + "block.createrailwaysnavigator.advanced_display.tooltip.condition1": "При ПКМ за допомогою Гайкового ключа", + "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "Відкрийте меню щоб _налаштувати_ _табло_.", + "block.createrailwaysnavigator.advanced_display_small": "Мале Просунуте Табло", + "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "Використовуйте його у _поїздах_ як _дисплей призначення поїзда_ або _інформаційний дисплей для пасажирів_, або на _залізничних станціях_ як _покращені платформні дисплеї_, які також показують більше інформації, ніж звичайні табло.", + "block.createrailwaysnavigator.advanced_display_small.tooltip.condition1": "При ПКМ за допомогою Гайкового ключа", + "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "Відкрийте меню щоб _налаштувати_ _табло_.", + "block.createrailwaysnavigator.advanced_display_panel": "Просунута Панель Дисплею", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "Використовуйте його у _поїздах_ як _дисплей призначення поїзда_ або _інформаційний дисплей для пасажирів_, або на _залізничних станціях_ як _покращені платформні дисплеї_, які також показують більше інформації, ніж звичайні табло.", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.condition1": "При ПКМ за допомогою Гайкового ключа", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "Відкрийте меню щоб _налаштувати_ _табло_.", + "block.createrailwaysnavigator.advanced_display_half_panel": "Половина Просунутої Панелі Дисплею", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "Використовуйте його у _поїздах_ як _дисплей призначення поїзда_ або _інформаційний дисплей для пасажирів_, або на _залізничних станціях_ як _покращені платформні дисплеї_, які також показують більше інформації, ніж звичайні табло.", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.condition1": "При ПКМ за допомогою Гайкового ключа", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "Відкрийте меню щоб _налаштувати_ _табло_.", + "block.createrailwaysnavigator.advanced_display_sloped": "Похилене Просунуте Табло", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "Використовуйте його у _поїздах_ як _дисплей призначення поїзда_ або _інформаційний дисплей для пасажирів_, або на _залізничних станціях_ як _покращені платформні дисплеї_, які також показують більше інформації, ніж звичайні табло.", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.condition1": "При ПКМ за допомогою Гайкового ключа", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "Відкрийте меню щоб _налаштувати_ _табло_.", + "block.createrailwaysnavigator.advanced_display_slab": "Розширена Плита Дисплею", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.summary": "Використовуйте його у _поїздах_ як _дисплей призначення поїзда_ або _інформаційний дисплей для пасажирів_, або на _залізничних станціях_ як _покращені платформні дисплеї_, які також показують більше інформації, ніж звичайні табло.", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.condition1": "При ПКМ за допомогою Гайкового ключа", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.behaviour1": "Відкрийте меню щоб _налаштувати_ _табло_.", + "block.createrailwaysnavigator.advanced_display.ber.not_in_service": "Не працює!", + "category.createrailwaysnavigator.crn": "Залізничний Навігатор", + "key.createrailwaysnavigator.route_overlay_options": "Показувати параметри накладання маршруту", + "enum.createrailwaysnavigator.overlay_position": "Розташування дисплею", + "enum.createrailwaysnavigator.overlay_position.info.top_left": "Верхній лівий кут", + "enum.createrailwaysnavigator.overlay_position.info.top_right": "Верхній Правий Кут", + "enum.createrailwaysnavigator.overlay_position.info.bottom_left": "Нижній Лівий Кут", + "enum.createrailwaysnavigator.overlay_position.info.bottom_right": "Нижній правий кут", + "gui.createrailwaysnavigator.loading.title": "Завантаження даних із сервера...", + "gui.createrailwaysnavigator.overlay_settings.title": "Налаштування накладання маршруту", + "gui.createrailwaysnavigator.route_overlay_settings.show_details": "Показати деталі", + "gui.createrailwaysnavigator.route_overlay_settings.unpin": "Видалити накладання маршруту", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.on": "Оголошення Диктора увімкнено.", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.off": "Оголошення Диктора вимкнено.", + "gui.createrailwaysnavigator.route_overlay_settings.notifications.on": "Сповіщення увімкнено", + "gui.createrailwaysnavigator.route_overlay_settings.notifications.off": "Сповіщення вимкнено", + "gui.createrailwaysnavigator.route_overlay_settings.scale": "Масштаб інтерфейсу", + "gui.createrailwaysnavigator.route_overlay_settings.narrator": "Оголошення Диктора", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.description": "Диктор оголошує важливі події у вашій подорожі, наприклад, наступна зупинка, зміни тощо.", + "gui.createrailwaysnavigator.route_overlay_settings.notifications": "Сповіщення", + "gui.createrailwaysnavigator.route_overlay_settings.notifications.description": "Отримувати сповіщення про важливі події в поїздці, наприклад, про наступну зупинку, зміни тощо.", + "gui.createrailwaysnavigator.common.expand": "Показати подробиці", + "gui.createrailwaysnavigator.common.collapse": "Сховати подробиці", + "gui.createrailwaysnavigator.common.go_back": "Назад", + "gui.createrailwaysnavigator.common.go_to_top": "Прокрутити на початок", + "gui.createrailwaysnavigator.common.reset_defaults": "Відновити стандартні значення", + "gui.createrailwaysnavigator.common.count": "Кількість", + "gui.createrailwaysnavigator.common.true": "Так", + "gui.createrailwaysnavigator.common.false": "Ні", + "gui.createrailwaysnavigator.common.search": "Пошук", + "gui.createrailwaysnavigator.common.auto": "Авто", + "gui.createrailwaysnavigator.common.server_error": "Помилка сервера під час виконання завдання. Дивись консоль для отримання додаткової інформації.", + "gui.createrailwaysnavigator.common.delete": "Видалити", + "gui.createrailwaysnavigator.common.add": "Додати", + "gui.createrailwaysnavigator.common.help": "Допомога", + "gui.createrailwaysnavigator.navigator.title": "Залізничний Навігатор", + "gui.createrailwaysnavigator.navigator.no_connections": "З'єднань не знайдено.", + "gui.createrailwaysnavigator.navigator.not_searched": "Поки що нічого не знайшлося.", + "gui.createrailwaysnavigator.navigator.searching": "Пошук підключень...", + "gui.createrailwaysnavigator.navigator.error_title": "Помилка при навігації!", + "gui.createrailwaysnavigator.navigator.start_end_null": "Старт або призначення порожні.", + "gui.createrailwaysnavigator.navigator.start_end_equal": "Початок і призначення рівні.", + "gui.createrailwaysnavigator.navigator.route_entry.connection_in_past": "❌ З'єднання в минулому", + "gui.createrailwaysnavigator.navigator.route_entry.transfer": "Пересадка", + "gui.createrailwaysnavigator.navigator.route_entry.station_start": "з %s", + "gui.createrailwaysnavigator.navigator.global_settings.tooltip": "Глобальні налаштування", + "gui.createrailwaysnavigator.navigator.search_settings.tooltip": "Пошук налаштувань", + "gui.createrailwaysnavigator.navigator.search.tooltip": "Пошук", + "gui.createrailwaysnavigator.navigator.location.tooltip": "Найближча станція з поточної позиції", + "gui.createrailwaysnavigator.navigator.refresh.tooltip": "Оновити", + "gui.createrailwaysnavigator.navigator.switch.tooltip": "Перемкнути поля", + "gui.createrailwaysnavigator.route_details.title": "Подробиці маршруту", + "gui.createrailwaysnavigator.route_details.departure": "Відправлення через", + "gui.createrailwaysnavigator.route_details.next_transfer_time": "Пересадка через", + "gui.createrailwaysnavigator.route_details.transfer": "Пересадка", + "gui.createrailwaysnavigator.route_overview.title": "Супутник подорожі", + "gui.createrailwaysnavigator.route_overview.journey_begins": "Ваша поїздка починається! %s до %s, відправлення %s", + "gui.createrailwaysnavigator.route_overview.journey_begins_with_platform": "Ваша поїздка починається! %s до %s, відправлення %s з платформи %s", + "gui.createrailwaysnavigator.route_overview.train_details": "%s до %s", + "gui.createrailwaysnavigator.route_overview.next_stop": "Наступна зупинка: %s", + "gui.createrailwaysnavigator.route_overview.transfer": "Змінити %s → %s", + "gui.createrailwaysnavigator.route_overview.transfer_with_platform": "Змінити %s → %s на платформі %s", + "gui.createrailwaysnavigator.route_overview.journey_completed": "Поїздку завершено", + "gui.createrailwaysnavigator.route_overview.after_journey": "Ви досягли %s. Дякуємо за подорож і приємного дня.", + "gui.createrailwaysnavigator.route_overview.next_connections": "Наступне з'єднання", + "gui.createrailwaysnavigator.route_overview.schedule_transfer": "Планування пересадки", + "gui.createrailwaysnavigator.route_overview.train_cancelled": "Поїзд скасовано", + "gui.createrailwaysnavigator.route_overview.train_cancellation_info": "Інформація про %s", + "gui.createrailwaysnavigator.route_overview.stop_cancelled": "❌ Скасовано", + "gui.createrailwaysnavigator.route_overview.connection_endangered": "З'єднання втрачене", + "gui.createrailwaysnavigator.route_overview.connection_missed": "З'єднання пропущено", + "gui.createrailwaysnavigator.route_overview.connection_cancelled": "Поїзд скасовано", + "gui.createrailwaysnavigator.route_overview.journey_interrupted": "Ваша поїздка до %s не може бути продовжена.", + "gui.createrailwaysnavigator.route_overview.connection_missed_info": "Через затримку поїзда ви пропустили через пересадку. Знайжіть альтернативу в навігаторі. Перепрошиваємо за незручності.", + "gui.createrailwaysnavigator.route_overview.train_cancelled_info": "Інформацію про %s: Сьогодні цей поїзд скасовано! Ми вибачаємося за незручності. Знайдіть альтернативу в навігації.", + "gui.createrailwaysnavigator.route_overview.train_cancelled_title": "Поїзд було скасовано", + "gui.createrailwaysnavigator.route_overview.journey_interrupted_info": "Ваша подорож до %s не може бути продовжена. Знайдіть альтернативу в навігаторі.", + "gui.createrailwaysnavigator.route_overview.options": "Натисніть %s для опцій.", + "gui.createrailwaysnavigator.route_overview.notification.journey_begins.title": "Ваша поїздка до %s починається!", + "gui.createrailwaysnavigator.route_overview.notification.journey_begins": "%s до %s, відправлення %s", + "gui.createrailwaysnavigator.route_overview.notification.journey_begins_with_platform": "%s до %s, відправлення %s з платформи %s", + "gui.createrailwaysnavigator.route_overview.notification.platform_changed.title": "Ваша платформа змінилася!", + "gui.createrailwaysnavigator.route_overview.notification.platform_changed": "Ваш поїзд через %s покидає з платформи %s сьогодні.", + "gui.createrailwaysnavigator.route_overview.notification.train_delayed.title": "%s: Прибуття %s затрималося.", + "gui.createrailwaysnavigator.route_overview.notification.train_delayed": "%s замість %s через %s", + "gui.createrailwaysnavigator.route_overview.notification.train_cancelled.title": "%s: Поїзд скасовано", + "gui.createrailwaysnavigator.route_overview.notification.train_cancelled": "%s до %s відмінено сьогодні.", + "gui.createrailwaysnavigator.route_overview.notification.transfer.title": "Наближається пересадка", + "gui.createrailwaysnavigator.route_overview.notification.transfer": "Змінити %s → %s", + "gui.createrailwaysnavigator.route_overview.notification.transfer_with_platform": "Змінити %s → %s на платформі %s", + "gui.createrailwaysnavigator.route_overview.notification.connection_endangered.title": "З'єднання втрачене!", + "gui.createrailwaysnavigator.route_overview.notification.connection_endangered": "Можливо, ви не зможете дістатися від %s до %s.", + "gui.createrailwaysnavigator.route_overview.notification.connection_missed.title": "Пропущене з'єднання", + "gui.createrailwaysnavigator.route_overview.notification.connection_missed": "Ви пропустили свій поїзд пересадки від %s до %s.", + "gui.createrailwaysnavigator.route_overview.notification.journey_completed.title": "Досягнуто пункту призначення!", + "gui.createrailwaysnavigator.route_overview.notification.journey_completed": "Дякую за подорож і гарного дня", + "gui.createrailwaysnavigator.route_overview.date": "День %s, %s", + "gui.createrailwaysnavigator.global_settings.title": "Глобальні налаштування", + "gui.createrailwaysnavigator.global_settings.option.tooltip": "Натисніть для редагування", + "gui.createrailwaysnavigator.global_settings.option_alias.title": "Теги Залізничної станції", + "gui.createrailwaysnavigator.global_settings.option_alias.description": "Об'єднати окремі залізничні станції в одну багато платформну станцію з власною назвою, щоб навігатор пропонував пересадки та інше.", + "gui.createrailwaysnavigator.global_settings.option_blacklist.title": "Чорний Список Залізничних Станцій", + "gui.createrailwaysnavigator.global_settings.option_blacklist.description": "Сховати залізничні станції, які не повинні з'являтися в результатах навігації. Ці станції будуть проігноровані при створенні маршрутів.", + "gui.createrailwaysnavigator.global_settings.train_group.title": "Поїздні групи", + "gui.createrailwaysnavigator.global_settings.train_group.description": "Створюйте групи поїздів, щоб організувати всі поїзди (наприклад, регіональні послуги, міжміські послуги тощо.) Користувачі можуть вирішити, які залізничні групи вони хочуть використовувати.", + "gui.createrailwaysnavigator.global_settings.train_blacklist.title": "Чорний список поїздів", + "gui.createrailwaysnavigator.global_settings.train_blacklist.description": "Сховати поїзди, наприклад, вантажні поїзди, спеціальні потяги тощо., щоб їх не використовували в пропонованих напрямках.", + "gui.createrailwaysnavigator.station_tags.summary": "Містить %s залізничних станцій", + "gui.createrailwaysnavigator.station_tags.editor": "Востаннє змінено %s о %s", + "gui.createrailwaysnavigator.station_tags.add.tooltip": "Створити новий запис", + "gui.createrailwaysnavigator.station_tags.delete_alias.tooltip": "Видалити тег", + "gui.createrailwaysnavigator.station_tags.delete_station.tooltip": "Прибрати станцію", + "gui.createrailwaysnavigator.station_tags.modify_platform.tooltip": "Натисніть, щоб змінити", + "gui.createrailwaysnavigator.station_tags.add_station.tooltip": "Додати станцію", + "gui.createrailwaysnavigator.station_tags.hint.station_name": "Назва Залізничної станції", + "gui.createrailwaysnavigator.station_tags.hint.platform": "Назва платформи", + "gui.createrailwaysnavigator.station_tags.enter_name": "Введіть тут ім'я", + "gui.createrailwaysnavigator.train_group_settings.title": "Налаштування Групи Поїздів", + "gui.createrailwaysnavigator.train_group_settings.summary": "Містить %s поїздів", + "gui.createrailwaysnavigator.train_group_settings.editor": "Востаннє змінено %s о %s", + "gui.createrailwaysnavigator.train_group_settings.delete_alias.tooltip": "Видалити групу", + "gui.createrailwaysnavigator.train_group_settings.delete_station.tooltip": "Прибрати поїзд", + "gui.createrailwaysnavigator.train_group_settings.add_station.tooltip": "Додати поїзд", + "gui.createrailwaysnavigator.blacklist.title": "Чорний Список Залізничних Станцій", + "gui.createrailwaysnavigator.blacklist.add.tooltip": "Додати до чорного списку", + "gui.createrailwaysnavigator.blacklist.delete.tooltip": "Видалити з чорного списку", + "gui.createrailwaysnavigator.train_blacklist.title": "Чорний список поїздів", + "gui.createrailwaysnavigator.train_blacklist.add.tooltip": "Додати до чорного списку", + "gui.createrailwaysnavigator.train_blacklist.delete.tooltip": "Видалити з чорного списку", + "gui.createrailwaysnavigator.search_settings.title": "Пошук налаштувань", + "gui.createrailwaysnavigator.search_settings.transfer_time": "Мінімальний Час Пересадки", + "gui.createrailwaysnavigator.search_settings.transfer_time.description": "Мінімальний час, який повинен бути доступний для пересадки між поїздами. (1 год ~ 50 реальних секунд)", + "gui.createrailwaysnavigator.search_settings.train_groups": "Фільтр категорії поїздів", + "gui.createrailwaysnavigator.search_settings.train_groups.description": "Вирішіть, з яких категорій поїздів, які ви хочете використовувати.", + "gui.createrailwaysnavigator.search_settings.train_groups.overview": "Вибрано категорії %s", + "gui.createrailwaysnavigator.search_settings.train_groups.overview.all": "Усі", + "gui.createrailwaysnavigator.search_settings.train_groups.overview.none": "Немає", + "gui.createrailwaysnavigator.search_settings.train_groups.tooltip.reset": "Скинути фільтр", + "gui.createrailwaysnavigator.new_text_entry.add.tooltip": "Додати", + "gui.createrailwaysnavigator.time": "Час: %s", + "gui.createrailwaysnavigator.time.now": "зараз", + "gui.createrailwaysnavigator.time_format.dhm": "%s Днів %s год %s хв.", + "gui.createrailwaysnavigator.time_format.hm": "%s Год %s хв.", + "gui.createrailwaysnavigator.time_format.m": "%s Хв.", + "gui.createrailwaysnavigator.platform": "Платформа", + "gui.createrailwaysnavigator.departure": "Відправлення", + "gui.createrailwaysnavigator.destination": "Пункт призначення", + "gui.createrailwaysnavigator.line": "Лінія", + "gui.createrailwaysnavigator.following_trains": "Наступні поїзди:", + "gui.createrailwaysnavigator.via": "через", + "gui.createrailwaysnavigator.advanced_display_settings.title": "Розширені налаштування дисплея", + "gui.createrailwaysnavigator.advanced_display_settings.display_type": "Тип Дисплею", + "gui.createrailwaysnavigator.advanced_display_settings.display_type.description": "Визначає відображувану інформацію.", + "gui.createrailwaysnavigator.advanced_display_settings.info_type": "Тип інформації", + "gui.createrailwaysnavigator.advanced_display_settings.info_type.description": "Визначає, наскільки детально описана інформація.", + "gui.createrailwaysnavigator.advanced_display_settings.double_sided": "Двосторонній", + "enum.createrailwaysnavigator.display_info_type": "Тип Відображуваної інформації", + "enum.createrailwaysnavigator.display_info_type.description": "Визначає, скільки інформації слід відображати на дисплеї.", + "enum.createrailwaysnavigator.display_info_type.simple": "Спрощено", + "enum.createrailwaysnavigator.display_info_type.info.simple": "Дисплей буде показувати лише найважливішу інформацію без додаткових деталей.", + "enum.createrailwaysnavigator.display_info_type.detailed": "Докладно", + "enum.createrailwaysnavigator.display_info_type.info.detailed": "Буде показана найважливіша інформація з деякими деталями, такими як швидкість поїзда, зупинки тощо.", + "enum.createrailwaysnavigator.display_info_type.informative": "Інформаційно", + "enum.createrailwaysnavigator.display_info_type.info.informative": "Показує всю інформацію, яка може бути цікавою і відображати її в вишуканому макеті. Не рекомендується для малих екранів, оскільки текст може бути дуже малим.", + "enum.createrailwaysnavigator.display_type": "Тип Дисплею", + "enum.createrailwaysnavigator.display_type.description": "Тип вашого дисплею, залежить від їх призначення.", + "enum.createrailwaysnavigator.display_type.train_destination": "Пункт призначення поїзда", + "enum.createrailwaysnavigator.display_type.info.train_destination": "Щоб його використовували за межами потягів, він показує інформацію про сам потяг таку, як ім’я, призначення та (якщо обрано) зупинки та інші відомості.", + "enum.createrailwaysnavigator.display_type.passenger_information": "Інформація для пасажирів", + "enum.createrailwaysnavigator.display_type.info.passenger_information": "Представляє дисплеї всередині поїздів. Такі дисплеї показуватимуть наступну зупинку, сторону виходу та (якщо вибрано) швидкість поїзду та маршрут.", + "enum.createrailwaysnavigator.display_type.platform": "Дисплей платформи", + "enum.createrailwaysnavigator.display_type.info.platform": "Ці дисплеї слід використовувати на залізничних станціях, бо показують наступні поїзди з додатковими подробицями якщо вибрано. Не можна використовувати в поїздах!", + "enum.createrailwaysnavigator.side": "Сторона", + "enum.createrailwaysnavigator.side.description": "Сторона блоку, на якій слід подавати інформацію.", + "enum.createrailwaysnavigator.side.front": "Лицьова сторона", + "enum.createrailwaysnavigator.side.info.front": "Інформація буде відображена тільки на лицьовій стороні. Це типова поведінка.", + "enum.createrailwaysnavigator.side.both": "Обидві сторони", + "enum.createrailwaysnavigator.side.info.both": "Інформація буде відображена з обох сторін.", + "enum.createrailwaysnavigator.time_display": "Відображення часу", + "enum.createrailwaysnavigator.time_display.description": "Визначає, як має відображатися час.", + "enum.createrailwaysnavigator.time_display.abs": "ABS", + "enum.createrailwaysnavigator.time_display.info.abs": "ABS (абсолютний)", + "enum.createrailwaysnavigator.time_display.eta": "ЕТА", + "enum.createrailwaysnavigator.time_display.info.eta": "ETA (орієнтовний час прибуття)", + "create.display_source.advanced_display": "Просунуті Дисплеї", + "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width": "Ширина стовпця назви поїзда", + "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description": "в пікселях блоку (за замовчуванням: 16)", + "gui.createrailwaysnavigator.display_source.advanced_display.platform_width": "Ширина колони платформи", + "gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description": "в пікселях блоку (за замовчуванням: авто)", + "gui.createrailwaysnavigator.section_settings.title": "Налаштування секції", + "gui.createrailwaysnavigator.section_settings.train_groups": "Призначити поїздну групу", + "gui.createrailwaysnavigator.section_settings.train_lines": "Призначити залізничну лінію", + "gui.createrailwaysnavigator.section_settings.include_previous_station": "З початком наступної секції", + "gui.createrailwaysnavigator.section_settings.usable": "Доступний для навігації", + "gui.createrailwaysnavigator.section_settings.none": "(Не вказано)", + "createrailwaysnavigator.schedule.condition.dynamic_delay": "Динамічна затримка", + "createrailwaysnavigator.schedule.condition.dynamic_delay.min_duration": "Мінімальна тривалість", + "createrailwaysnavigator.schedule.condition.dynamic_delay.title": "Почекайте: %s..%s", + "createrailwaysnavigator.schedule.condition.dynamic_delay.at_least": "або принаймні %s", + "createrailwaysnavigator.schedule.instruction.travel_section": "Новий розділ розкладу", + "createrailwaysnavigator.schedule.instruction.travel_section.description": "Початок нового розділу розкладу.", + "createrailwaysnavigator.schedule.instruction.travel_section.configure": "Налаштувати...", + "createrailwaysnavigator.schedule.instruction.travel_section.train_group": " - Задати поїздну групу: ", + "createrailwaysnavigator.schedule.instruction.travel_section.train_line": " - Призначити залізничну лінію: ", + "createrailwaysnavigator.schedule.instruction.travel_section.include_previous_station": " - З початком наступної секції: ", + "createrailwaysnavigator.schedule.instruction.travel_section.usable": " - Доступний для навігації: ", + "createrailwaysnavigator.schedule.instruction.reset_timings": "Скинути таймінги", + "display.createrailwaysnavigator.train_destination.simple": "Компактно", + "display.createrailwaysnavigator.train_destination.extended": "Розширено", + "display.createrailwaysnavigator.train_destination.detailed": "Докладно", + "display.createrailwaysnavigator.passenger_information.running_text": "Прокручування тексту", + "display.createrailwaysnavigator.passenger_information.detailed_with_schedule": "Докладно з розкладу", + "display.createrailwaysnavigator.platform.running_text": "Прокручування тексту", + "display.createrailwaysnavigator.platform.table": "Таблиця", + "display.createrailwaysnavigator.platform.focus": "Фокус", + "gui.createrailwaysnavigator.saved_routes.title": "Збережені маршрути", + "gui.createrailwaysnavigator.schedule_board.title": "Дошка розкладу", + "gui.createrailwaysnavigator.station_tags.title": "Мітки станції", + "gui.createrailwaysnavigator.journey_info.title": "Інформація про подорож", + "gui.createrailwaysnavigator.journey_info.date": "День %s", + "gui.createrailwaysnavigator.journey_info.train": "%s (%s) до %s", + "gui.createrailwaysnavigator.color_picker.custom": "Власне...", + "gui.createrailwaysnavigator.color_picker.no_color": "Без кольору", + "gui.createrailwaysnavigator.schedule_board.view_details": "Переглянути подробиці", + "gui.createrailwaysnavigator.schedule_board.train_from": "з %s", + "gui.createrailwaysnavigator.search_options.departure_in": "Відправлення через", + "gui.createrailwaysnavigator.search_options.train_groups": "Поїздні групи", + "gui.createrailwaysnavigator.search_options.transfer_time": "Час пересадки", + "gui.createrailwaysnavigator.search_options.advanced_options": "Просунуті налаштування", + "gui.createrailwaysnavigator.search_options.train_groups.all": "Усі", + "gui.createrailwaysnavigator.search_options.train_groups.excluded": "%s виключно", + "gui.createrailwaysnavigator.search_options.saved_routes.all": "Усі", + "gui.createrailwaysnavigator.search_options.saved_routes.excluded": "%s виключно", + "gui.createrailwaysnavigator.empty_list": "Список порожній", + "gui.createrailwaysnavigator.new_entry.add": "Додати новий запис", + "gui.createrailwaysnavigator.new_entry.new": "Нове:", + "gui.createrailwaysnavigator.saved_routes.saved": "%s збережено", + "gui.createrailwaysnavigator.route_overview.notification.schedule_changed.title": "Розклад змінився!", + "gui.createrailwaysnavigator.route_overview.notification.schedule_changed": "Розклад збереженого маршруту змінився. Будь ласка, перевірте навігатор.", + "gui.createrailwaysnavigator.route_overview.transfers": "%s Пересадок", + "gui.createrailwaysnavigator.route_overview.cancelled": "Скасовано", + "gui.createrailwaysnavigator.saved_routes.saved_route": "Збережений маршрут", + "block.createrailwaysnavigator.advanced_display.ber.arrival": "Прибуття", + "block.createrailwaysnavigator.advanced_display.ber.cancelled": "Скасовано", + "block.createrailwaysnavigator.advanced_display.ber.delayed": "Затримка приблизно %s хвилин", + "block.createrailwaysnavigator.advanced_display.ber.information_about_cancelled": "Інформація про %s: Цей поїзд було скасовано", + "block.createrailwaysnavigator.advanced_display.ber.information_about_delayed": "Інформація про %s: Затримка приблизно %s хвилин", + "block.createrailwaysnavigator.advanced_display.ber.cancelled2": ", скасовувано сьогодні. Перепрошуємо за незручності.", + "block.createrailwaysnavigator.advanced_display.ber.delayed2": ", сьогодні приблизно %s хвилин затримки.", + "block.createrailwaysnavigator.advanced_display.ber.reason": "Причина: ", + "gui.createrailwaysnavigator.route_widget.show_details": "Показати деталі", + "gui.createrailwaysnavigator.route_widget.save": "Зберегти", + "gui.createrailwaysnavigator.route_widget.remove": "Вилучити", + "gui.createrailwaysnavigator.route_widget.share": "Поділитися...", + "gui.createrailwaysnavigator.saved_routes.in_the_past": "В минулому", + "gui.createrailwaysnavigator.saved_routes.today": "Сьогодні", + "gui.createrailwaysnavigator.saved_routes.tomorrow": "Завтра", + "gui.createrailwaysnavigator.saved_routes.in_days": "За %s дні", + "gui.createrailwaysnavigator.saved_route_widget.show_details": "Показати деталі", + "gui.createrailwaysnavigator.saved_route_widget.share": "Поділитися...", + "gui.createrailwaysnavigator.saved_route_widget.notifications": "Відображати сповіщення", + "gui.createrailwaysnavigator.train_status.unknown_delay": "Затримка в операціях", + "gui.createrailwaysnavigator.train_status.delay_previous_journey": "Затримка в попередній поїздці", + "gui.createrailwaysnavigator.train_status.red_signal": "Червоний сигнал", + "gui.createrailwaysnavigator.train_status.priority_other_train": "Пріоритет іншого поїзду", + "gui.createrailwaysnavigator.train_status.delay_other_train": "Затримка іншого поїзду", + "gui.createrailwaysnavigator.train_status.track_closed": "Маршрут перекрито", + "gui.createrailwaysnavigator.train_status.staff_shortage": "Недостатньо персоналу", + "gui.createrailwaysnavigator.train_status.operational_disruption": "Операційний перерив", + "gui.createrailwaysnavigator.train_status.special_trip": "Спеціальна поїздка", + "gui.createrailwaysnavigator.route_details.save_route.tooltip": "Зберегти маршрут", + "gui.createrailwaysnavigator.route_details.remove_route.tooltip": "Видалити маршрут", + "gui.createrailwaysnavigator.route_details.show_popup.tooltip": "Показувати спливаюче вікно", + "gui.createrailwaysnavigator.navigator.my_profile": "Мій профіль", + "gui.createrailwaysnavigator.navigator.train_initialization_warning": "Деякі маршрути можуть бути неповними або не запропоновані взагалі, оскільки навігатор ще не ініціалізував усі потяги.", + "gui.createrailwaysnavigator.global_settings.train_line.title": "Залізничні лінії", + "gui.createrailwaysnavigator.global_settings.train_line.color": "Вибір кольору", + "gui.createrailwaysnavigator.global_settings.train_line.description": "Створюйте залізничні лінії для групування поїздів разом, перезаписувати їх назви та налаштовувати інші параметри для кожної лінії. (Можна присвоїти потягам тільки в розкладі)" +} diff --git a/common/src/main/resources/assets/createrailwaysnavigator/lang/zh_cn.json b/common/src/main/resources/assets/createrailwaysnavigator/lang/zh_cn.json index ec0cfa8b..f76ebaf8 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/lang/zh_cn.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/lang/zh_cn.json @@ -1,58 +1,53 @@ { "advancement.createrailwaysnavigator.navigator": "感谢您的乘坐", - "advancement.createrailwaysnavigator.navigator.description": "制作一个导航仪,用于搜索从一个车站到另一个车站的列车路线。", + "advancement.createrailwaysnavigator.navigator.description": "制作一个导航仪,用于搜索从一个车站到另一个车站的列车路线。", "advancement.createrailwaysnavigator.advanced_display": "还不够清晰", "advancement.createrailwaysnavigator.advanced_display.description": "升级您的显示器以显示更多信息,甚至可以将它们放置在您的列车上。", - - "itemGroup.createrailwaysnavigator.tab": "机械动力:铁路导航", - "item.createrailwaysnavigator.navigator": "铁路导航仪", - "item.createrailwaysnavigator.navigator.tooltip.summary": "_导航仪_可以显示可能的_列车路线_,以及_经停站_、_实时信息_等。", - + "item.createrailwaysnavigator.navigator.tooltip.summary": "_导航仪_可以显示可能的_列车路线_,以及_经停站_、_实时信息_等。", "block.createrailwaysnavigator.train_station_clock": "车站时钟", "block.createrailwaysnavigator.advanced_display_block": "高级显示器方块", - "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "使用在_列车上_,可以展示_列车目的地_或_乘客信息_, 也可以放置在_车站_当作_站台显示器_, 比普通显示器显示更多信息。", + "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "使用在_列车上_,可以展示_列车目的地_或_乘客信息_, 也可以放置在_车站_当作_站台显示器_, 比普通显示器显示更多信息。", "block.createrailwaysnavigator.advanced_display_block.tooltip.condition1": "用扳手右击时", - "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "打开菜单以_配置_显示器。", + "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "打开菜单以_配置_显示器。", "block.createrailwaysnavigator.advanced_display": "高级显示器", - "block.createrailwaysnavigator.advanced_display.tooltip.summary": "使用在_列车上_,可以展示_列车目的地_或_乘客信息_, 也可以放置在_车站_当作_站台显示器_, 比普通显示器显示更多信息。", + "block.createrailwaysnavigator.advanced_display.tooltip.summary": "使用在_列车上_,可以展示_列车目的地_或_乘客信息_, 也可以放置在_车站_当作_站台显示器_, 比普通显示器显示更多信息。", "block.createrailwaysnavigator.advanced_display.tooltip.condition1": "用扳手右击时", - "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "打开菜单以_配置_显示器。", + "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "打开菜单以_配置_显示器。", "block.createrailwaysnavigator.advanced_display_small": "小型高级显示器", - "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "使用在_列车上_,可以展示_列车目的地_或_乘客信息_, 也可以放置在_车站_当作_站台显示器_, 比普通显示器显示更多信息。", + "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "使用在_列车上_,可以展示_列车目的地_或_乘客信息_, 也可以放置在_车站_当作_站台显示器_, 比普通显示器显示更多信息。", "block.createrailwaysnavigator.advanced_display_small.tooltip.condition1": "用扳手右击时", - "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "打开菜单以_配置_显示器。", + "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "打开菜单以_配置_显示器。", "block.createrailwaysnavigator.advanced_display_panel": "高级显示面板", - "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "使用在_列车上_,可以展示_列车目的地_或_乘客信息_, 也可以放置在_车站_当作_站台显示器_, 比普通显示器显示更多信息。", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "使用在_列车上_,可以展示_列车目的地_或_乘客信息_, 也可以放置在_车站_当作_站台显示器_, 比普通显示器显示更多信息。", "block.createrailwaysnavigator.advanced_display_panel.tooltip.condition1": "用扳手右击时", - "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "打开菜单以_配置_显示器。", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "打开菜单以_配置_显示器。", "block.createrailwaysnavigator.advanced_display_half_panel": "高级半显示面板", - "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "使用在_列车上_,可以展示_列车目的地_或_乘客信息_, 也可以放置在_车站_当作_站台显示器_, 比普通显示器显示更多信息。", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "使用在_列车上_,可以展示_列车目的地_或_乘客信息_, 也可以放置在_车站_当作_站台显示器_, 比普通显示器显示更多信息。", "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.condition1": "用扳手右击时", - "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "打开菜单以_配置_显示器。", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "打开菜单以_配置_显示器。", "block.createrailwaysnavigator.advanced_display_sloped": "斜面高级显示器", - "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "使用在_列车上_,可以展示_列车目的地_或_乘客信息_, 也可以放置在_车站_当作_站台显示器_, 比普通显示器显示更多信息。", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "使用在_列车上_,可以展示_列车目的地_或_乘客信息_, 也可以放置在_车站_当作_站台显示器_, 比普通显示器显示更多信息。", "block.createrailwaysnavigator.advanced_display_sloped.tooltip.condition1": "用扳手右击时", - "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "打开菜单以_配置_显示器。", - + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "打开菜单以_配置_显示器。", + "block.createrailwaysnavigator.advanced_display_slab": "Advanced Display Slab", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.summary": "将其放置在_列车_结构中,用于显示_列车目的地_或_乘客信息_,也可以在_列车站_用作改进版本的_站台信息_显示器,能够显示比普通显示器更多的信息。", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.condition1": "用扳手右击时", + "block.createrailwaysnavigator.advanced_display_slab.tooltip.behaviour1": "打开一个用于_配置显示器_的菜单", "block.createrailwaysnavigator.advanced_display.ber.not_in_service": "未启用", - "category.createrailwaysnavigator.crn": "机械动力:铁路导航", "key.createrailwaysnavigator.route_overlay_options": "显示路线覆盖选项", - "enum.createrailwaysnavigator.overlay_position": "显示位置", "enum.createrailwaysnavigator.overlay_position.info.top_left": "左上角", "enum.createrailwaysnavigator.overlay_position.info.top_right": "右上角", "enum.createrailwaysnavigator.overlay_position.info.bottom_left": "左下角", "enum.createrailwaysnavigator.overlay_position.info.bottom_right": "右下角", - "gui.createrailwaysnavigator.loading.title": "正在从服务器下载数据...", - "gui.createrailwaysnavigator.overlay_settings.title": "路线覆盖设置", "gui.createrailwaysnavigator.route_overlay_settings.show_details": "显示详细信息", "gui.createrailwaysnavigator.route_overlay_settings.unpin": "移除路线覆盖", "gui.createrailwaysnavigator.route_overlay_settings.narrator.on": "讲述人通知开启", - "gui.createrailwaysnavigator.route_overlay_settings.narrator.off": "讲述人通知关闭", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.off": "讲述人通知关闭", "gui.createrailwaysnavigator.route_overlay_settings.notifications.on": "开启通知", "gui.createrailwaysnavigator.route_overlay_settings.notifications.off": "关闭通知", "gui.createrailwaysnavigator.route_overlay_settings.scale": "GUI 大小", @@ -60,7 +55,6 @@ "gui.createrailwaysnavigator.route_overlay_settings.narrator.description": "讲述人会播报您旅途中的重要事件,例如下一站、换乘等。", "gui.createrailwaysnavigator.route_overlay_settings.notifications": "通知", "gui.createrailwaysnavigator.route_overlay_settings.notifications.description": "在旅途中接收关于重要事件的弹窗通知,例如下一站、换乘等。", - "gui.createrailwaysnavigator.common.expand": "显示详情", "gui.createrailwaysnavigator.common.collapse": "隐藏详情", "gui.createrailwaysnavigator.common.go_back": "返回", @@ -72,7 +66,9 @@ "gui.createrailwaysnavigator.common.search": "搜索", "gui.createrailwaysnavigator.common.auto": "自动", "gui.createrailwaysnavigator.common.server_error": "执行任务时出现问题,请查看控制台以获取更多信息。", - + "gui.createrailwaysnavigator.common.delete": "删除", + "gui.createrailwaysnavigator.common.add": "添加", + "gui.createrailwaysnavigator.common.help": "寻求帮助", "gui.createrailwaysnavigator.navigator.title": "机械动力:铁路导航", "gui.createrailwaysnavigator.navigator.no_connections": "未找到路线。", "gui.createrailwaysnavigator.navigator.not_searched": "尚未搜索。", @@ -87,14 +83,12 @@ "gui.createrailwaysnavigator.navigator.search_settings.tooltip": "搜索设置", "gui.createrailwaysnavigator.navigator.search.tooltip": "搜索", "gui.createrailwaysnavigator.navigator.location.tooltip": "定位最近的车站", + "gui.createrailwaysnavigator.navigator.refresh.tooltip": "刷新", "gui.createrailwaysnavigator.navigator.switch.tooltip": "交换地点", - "gui.createrailwaysnavigator.route_details.title": "路线详情", "gui.createrailwaysnavigator.route_details.departure": "出发时间", "gui.createrailwaysnavigator.route_details.next_transfer_time": "换乘时间", "gui.createrailwaysnavigator.route_details.transfer": "换乘", - "gui.createrailwaysnavigator.route_details.save_route": "保存路线", - "gui.createrailwaysnavigator.route_overview.title": "路线详情", "gui.createrailwaysnavigator.route_overview.journey_begins": "您的旅程开始了!%s到%s,出发时间%s", "gui.createrailwaysnavigator.route_overview.journey_begins_with_platform": "您的旅程开始了!%s到%s,出发时间%s,在%s站台乘车", @@ -124,7 +118,7 @@ "gui.createrailwaysnavigator.route_overview.notification.platform_changed.title": "站台已变更!", "gui.createrailwaysnavigator.route_overview.notification.platform_changed": "您在%s的列车将从%s号站台出发。", "gui.createrailwaysnavigator.route_overview.notification.train_delayed.title": "%s:延误%s", - "gui.createrailwaysnavigator.route_overview.notification.train_delayed": "原定%2$s,现将于%1$s抵达%3$s", + "gui.createrailwaysnavigator.route_overview.notification.train_delayed": "原定%2$s,现将于%1$s抵达%3$s", "gui.createrailwaysnavigator.route_overview.notification.train_cancelled.title": "%s:列车取消", "gui.createrailwaysnavigator.route_overview.notification.train_cancelled": "前往%2$s的%1$s已取消。", "gui.createrailwaysnavigator.route_overview.notification.transfer.title": "即将换乘", @@ -137,7 +131,6 @@ "gui.createrailwaysnavigator.route_overview.notification.journey_completed.title": "您已抵达目的地!", "gui.createrailwaysnavigator.route_overview.notification.journey_completed": "感谢您的乘坐,祝您旅途愉快", "gui.createrailwaysnavigator.route_overview.date": "第%s天,%s", - "gui.createrailwaysnavigator.global_settings.title": "全局设定", "gui.createrailwaysnavigator.global_settings.option.tooltip": "点击编辑", "gui.createrailwaysnavigator.global_settings.option_alias.title": "车站标签", @@ -148,13 +141,12 @@ "gui.createrailwaysnavigator.global_settings.train_group.description": "将列车加入列车分类(例如,区域服务、长途服务等)以方便管理,乘客可以决定要使用哪些列车分类。", "gui.createrailwaysnavigator.global_settings.train_blacklist.title": "列车黑名单", "gui.createrailwaysnavigator.global_settings.train_blacklist.description": "排除列车,例如货运列车、专列等,以便在路线建议中不显示它们。", - - "gui.createrailwaysnavigator.station_tags.title": "车站标签设定", "gui.createrailwaysnavigator.station_tags.summary": "包含%s个车站", "gui.createrailwaysnavigator.station_tags.editor": "最后编辑者:%s,于%s", "gui.createrailwaysnavigator.station_tags.add.tooltip": "创建新条目", "gui.createrailwaysnavigator.station_tags.delete_alias.tooltip": "删除标签", "gui.createrailwaysnavigator.station_tags.delete_station.tooltip": "移除车站", + "gui.createrailwaysnavigator.station_tags.modify_platform.tooltip": "点击更改", "gui.createrailwaysnavigator.station_tags.add_station.tooltip": "添加车站", "gui.createrailwaysnavigator.station_tags.hint.station_name": "车站名称", "gui.createrailwaysnavigator.station_tags.hint.platform": "站台", @@ -165,15 +157,12 @@ "gui.createrailwaysnavigator.train_group_settings.delete_alias.tooltip": "删除分类", "gui.createrailwaysnavigator.train_group_settings.delete_station.tooltip": "移除列车", "gui.createrailwaysnavigator.train_group_settings.add_station.tooltip": "添加列车", - "gui.createrailwaysnavigator.blacklist.title": "车站黑名单", "gui.createrailwaysnavigator.blacklist.add.tooltip": "加入黑名单", "gui.createrailwaysnavigator.blacklist.delete.tooltip": "移除黑名单", - "gui.createrailwaysnavigator.train_blacklist.title": "列车黑名单", "gui.createrailwaysnavigator.train_blacklist.add.tooltip": "加入黑名单", "gui.createrailwaysnavigator.train_blacklist.delete.tooltip": "移除黑名单", - "gui.createrailwaysnavigator.search_settings.title": "搜索设定", "gui.createrailwaysnavigator.search_settings.transfer_time": "最短换乘时间", "gui.createrailwaysnavigator.search_settings.transfer_time.description": "换乘需要的最短可用时间。(1 小时 ≈ 50 秒现实时间)", @@ -183,29 +172,24 @@ "gui.createrailwaysnavigator.search_settings.train_groups.overview.all": "全部", "gui.createrailwaysnavigator.search_settings.train_groups.overview.none": "无", "gui.createrailwaysnavigator.search_settings.train_groups.tooltip.reset": "重置筛选项", - "gui.createrailwaysnavigator.new_text_entry.add.tooltip": "添加", - "gui.createrailwaysnavigator.time": "时间:%s", "gui.createrailwaysnavigator.time.now": "现在", "gui.createrailwaysnavigator.time_format.dhm": "%s天%s小时%s分钟", "gui.createrailwaysnavigator.time_format.hm": "%s小时%s分钟", "gui.createrailwaysnavigator.time_format.m": "%s分钟", - "gui.createrailwaysnavigator.platform": "站台", "gui.createrailwaysnavigator.departure": "出发", "gui.createrailwaysnavigator.destination": "目的地", "gui.createrailwaysnavigator.line": "路线", "gui.createrailwaysnavigator.following_trains": "后续车次:", "gui.createrailwaysnavigator.via": "经停", - "gui.createrailwaysnavigator.advanced_display_settings.title": "高级显示设置", "gui.createrailwaysnavigator.advanced_display_settings.display_type": "显示器类型", "gui.createrailwaysnavigator.advanced_display_settings.display_type.description": "决定显示的信息。", "gui.createrailwaysnavigator.advanced_display_settings.info_type": "信息类型", "gui.createrailwaysnavigator.advanced_display_settings.info_type.description": "决定信息的详细程度。", "gui.createrailwaysnavigator.advanced_display_settings.double_sided": "双面显示", - "enum.createrailwaysnavigator.display_info_type": "信息类型", "enum.createrailwaysnavigator.display_info_type.description": "决定显示器上应显示多少信息。", "enum.createrailwaysnavigator.display_info_type.simple": "简洁", @@ -222,26 +206,110 @@ "enum.createrailwaysnavigator.display_type.info.passenger_information": "代表适用于列车内部的显示器。这种显示器将显示下一站、开门方向以及(如果选择)列车速度和路线概览。", "enum.createrailwaysnavigator.display_type.platform": "站台显示", "enum.createrailwaysnavigator.display_type.info.platform": "这种显示应在车站站台上使用,显示后续车次以及(如果选择)其他详细信息。不能在列车上使用!", - "enum.createrailwaysnavigator.side": "显示方向", "enum.createrailwaysnavigator.side.description": "决定信息应呈现在方块的哪一面。", "enum.createrailwaysnavigator.side.front": "正面", "enum.createrailwaysnavigator.side.info.front": "信息将仅在正面显示(默认行为)。", "enum.createrailwaysnavigator.side.both": "双面", "enum.createrailwaysnavigator.side.info.both": "信息将在双面显示。", - "enum.createrailwaysnavigator.time_display": "时间显示", "enum.createrailwaysnavigator.time_display.description": "决定时间的显示方式。", - "enum.createrailwaysnavigator.time_display.abs": "ABS", + "enum.createrailwaysnavigator.time_display.abs": "自动区间信号系统", "enum.createrailwaysnavigator.time_display.info.abs": "ABS(绝对时间、absolute)", - "enum.createrailwaysnavigator.time_display.eta": "ETA", + "enum.createrailwaysnavigator.time_display.eta": "预计到达时间", "enum.createrailwaysnavigator.time_display.info.eta": "ETA(预计到达时间、estimated time of arrival)", - "create.display_source.advanced_display": "高级显示", "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width": "列车名称列宽", "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description": "以像素为单位。(默认:16)", "gui.createrailwaysnavigator.display_source.advanced_display.platform_width": "站台列宽", "gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description": "以方块像素为单位。(默认:自动)", - - "createrailwaysnavigator.moin": "moin" + "gui.createrailwaysnavigator.section_settings.title": "区段设置", + "gui.createrailwaysnavigator.section_settings.train_groups": "分配列车编组", + "gui.createrailwaysnavigator.section_settings.train_lines": "分配列车线路", + "gui.createrailwaysnavigator.section_settings.include_previous_station": "包含下一个区段的起始", + "gui.createrailwaysnavigator.section_settings.usable": "可通行", + "gui.createrailwaysnavigator.section_settings.none": "(无)", + "createrailwaysnavigator.schedule.condition.dynamic_delay": "动态延迟", + "createrailwaysnavigator.schedule.condition.dynamic_delay.min_duration": "最低持续时间", + "createrailwaysnavigator.schedule.condition.dynamic_delay.title": "等待:%s至%s", + "createrailwaysnavigator.schedule.condition.dynamic_delay.at_least": "或至少%s", + "createrailwaysnavigator.schedule.instruction.travel_section": "新的时刻表区段", + "createrailwaysnavigator.schedule.instruction.travel_section.description": "从一个新的时刻表区段开始", + "createrailwaysnavigator.schedule.instruction.travel_section.configure": "配置…", + "createrailwaysnavigator.schedule.instruction.travel_section.train_group": " -设定列车组:", + "createrailwaysnavigator.schedule.instruction.travel_section.train_line": " -设定列车路线:", + "createrailwaysnavigator.schedule.instruction.travel_section.include_previous_station": " -包含下一个区段的开始:", + "createrailwaysnavigator.schedule.instruction.travel_section.usable": " -可通行:", + "createrailwaysnavigator.schedule.instruction.reset_timings": "重置时间", + "display.createrailwaysnavigator.train_destination.simple": "紧凑", + "display.createrailwaysnavigator.train_destination.extended": "扩展", + "display.createrailwaysnavigator.train_destination.detailed": "详细", + "display.createrailwaysnavigator.passenger_information.running_text": "滚动文本", + "display.createrailwaysnavigator.passenger_information.detailed_with_schedule": "详细时刻表", + "display.createrailwaysnavigator.platform.running_text": "滚动文本", + "display.createrailwaysnavigator.platform.table": "表格", + "display.createrailwaysnavigator.platform.focus": "焦点", + "gui.createrailwaysnavigator.saved_routes.title": "保存的路线", + "gui.createrailwaysnavigator.schedule_board.title": "时刻信息板", + "gui.createrailwaysnavigator.station_tags.title": "车站标签设定", + "gui.createrailwaysnavigator.journey_info.title": "旅程信息", + "gui.createrailwaysnavigator.journey_info.date": "第%s日", + "gui.createrailwaysnavigator.journey_info.train": "%s(%s)到%s", + "gui.createrailwaysnavigator.color_picker.custom": "自定义…", + "gui.createrailwaysnavigator.color_picker.no_color": "无色", + "gui.createrailwaysnavigator.schedule_board.view_details": "查看详情", + "gui.createrailwaysnavigator.schedule_board.train_from": "从%s", + "gui.createrailwaysnavigator.search_options.departure_in": "距发车还有", + "gui.createrailwaysnavigator.search_options.train_groups": "列车编组", + "gui.createrailwaysnavigator.search_options.transfer_time": "换乘时间", + "gui.createrailwaysnavigator.search_options.advanced_options": "高级选项", + "gui.createrailwaysnavigator.search_options.train_groups.all": "全部", + "gui.createrailwaysnavigator.search_options.train_groups.excluded": "%s 不包括在内", + "gui.createrailwaysnavigator.search_options.saved_routes.all": "全部", + "gui.createrailwaysnavigator.search_options.saved_routes.excluded": "%s 不包括在内", + "gui.createrailwaysnavigator.empty_list": "列表为空", + "gui.createrailwaysnavigator.new_entry.add": "添加新条目", + "gui.createrailwaysnavigator.new_entry.new": "新条目:", + "gui.createrailwaysnavigator.saved_routes.saved": "%s已保存", + "gui.createrailwaysnavigator.route_overview.notification.schedule_changed.title": "时刻表已更改!", + "gui.createrailwaysnavigator.route_overview.notification.schedule_changed": "您保存的路线时间表已被更改,请检视导航器以了解相关更动。", + "gui.createrailwaysnavigator.route_overview.transfers": "%s换乘", + "gui.createrailwaysnavigator.route_overview.cancelled": "已取消", + "gui.createrailwaysnavigator.saved_routes.saved_route": "保存的路线", + "block.createrailwaysnavigator.advanced_display.ber.arrival": "到达", + "block.createrailwaysnavigator.advanced_display.ber.cancelled": "已取消", + "block.createrailwaysnavigator.advanced_display.ber.delayed": "延误约%s分钟", + "block.createrailwaysnavigator.advanced_display.ber.information_about_cancelled": " 关于列车的信息:%s 列车已停运。", + "block.createrailwaysnavigator.advanced_display.ber.information_about_delayed": " 关于列车的信息:%s 预计延误约%s分钟。", + "block.createrailwaysnavigator.advanced_display.ber.cancelled2": ",今日服务已取消,给您带来的不便,敬请谅解。", + "block.createrailwaysnavigator.advanced_display.ber.delayed2": ",今日延误约%s分钟", + "block.createrailwaysnavigator.advanced_display.ber.reason": "原因:", + "gui.createrailwaysnavigator.route_widget.show_details": "显示详情", + "gui.createrailwaysnavigator.route_widget.save": "保存", + "gui.createrailwaysnavigator.route_widget.remove": "移除", + "gui.createrailwaysnavigator.route_widget.share": "分享…", + "gui.createrailwaysnavigator.saved_routes.in_the_past": "旧前", + "gui.createrailwaysnavigator.saved_routes.today": "今日", + "gui.createrailwaysnavigator.saved_routes.tomorrow": "明日", + "gui.createrailwaysnavigator.saved_routes.in_days": "在%s日内", + "gui.createrailwaysnavigator.saved_route_widget.show_details": "显示详情", + "gui.createrailwaysnavigator.saved_route_widget.share": "分享…", + "gui.createrailwaysnavigator.saved_route_widget.notifications": "显示通知", + "gui.createrailwaysnavigator.train_status.unknown_delay": "操作延误", + "gui.createrailwaysnavigator.train_status.delay_previous_journey": "前一班次延误", + "gui.createrailwaysnavigator.train_status.red_signal": "红灯信号", + "gui.createrailwaysnavigator.train_status.priority_other_train": "另一列车优先权", + "gui.createrailwaysnavigator.train_status.delay_other_train": "另一列车延误", + "gui.createrailwaysnavigator.train_status.track_closed": "轨道封闭", + "gui.createrailwaysnavigator.train_status.staff_shortage": "人员短缺", + "gui.createrailwaysnavigator.train_status.operational_disruption": "运营中断", + "gui.createrailwaysnavigator.train_status.special_trip": "特别行程", + "gui.createrailwaysnavigator.route_details.save_route.tooltip": "保存路线", + "gui.createrailwaysnavigator.route_details.remove_route.tooltip": "移除路线", + "gui.createrailwaysnavigator.route_details.show_popup.tooltip": "显示弹窗", + "gui.createrailwaysnavigator.navigator.my_profile": "个人资料", + "gui.createrailwaysnavigator.navigator.train_initialization_warning": "部分路线可能尚未完成,或未被推荐,原因是 机械动力:铁路导航 的导航系统尚未初始化所有列车。", + "gui.createrailwaysnavigator.global_settings.train_line.title": "列车路线", + "gui.createrailwaysnavigator.global_settings.train_line.color": "选择颜色", + "gui.createrailwaysnavigator.global_settings.train_line.description": "创建列车路线以便将不同列车分组,覆盖其显示名称并调整各路线的其他设置。(仅适用于已在调度中的列车)" } diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_block.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_block.json index 0751c70d..cd4d7d74 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_block.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_block.json @@ -4,6 +4,7 @@ "textures": { "1": "createrailwaysnavigator:block/advanced_display", "2": "createrailwaysnavigator:block/advanced_display_back", + "3": "createrailwaysnavigator:block/advanced_display_border", "particle": "createrailwaysnavigator:block/advanced_display" }, "elements": [ @@ -11,13 +12,21 @@ "from": [0, 0, 0], "to": [16, 16, 16], "faces": { - "north": {"uv": [0, 0, 16, 16], "texture": "#1", "cullface": "north"}, + "north": {"uv": [0, 0, 16, 16], "texture": "#1", "cullface": "north", "tintindex": 0}, "east": {"uv": [0, 0, 8, 8], "texture": "#2", "cullface": "east"}, "south": {"uv": [0, 0, 8, 8], "texture": "#2", "cullface": "south"}, "west": {"uv": [8, 0, 0, 8], "texture": "#2", "cullface": "west"}, "up": {"uv": [0, 0, 8, 8], "rotation": 90, "texture": "#2", "cullface": "up"}, "down": {"uv": [0, 0, 8, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 0, 0], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#3", "cullface": "north"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_block_double.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_block_double.json index c5e5382b..e1a37839 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_block_double.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_block_double.json @@ -4,6 +4,7 @@ "textures": { "1": "createrailwaysnavigator:block/advanced_display", "2": "createrailwaysnavigator:block/advanced_display_back", + "3": "createrailwaysnavigator:block/advanced_display_border", "particle": "createrailwaysnavigator:block/advanced_display" }, "elements": [ @@ -11,13 +12,22 @@ "from": [0, 0, 0], "to": [16, 16, 16], "faces": { - "north": {"uv": [0, 0, 16, 16], "texture": "#1", "cullface": "north"}, + "north": {"uv": [0, 0, 16, 16], "texture": "#1", "cullface": "north", "tintindex": 0}, "east": {"uv": [0, 0, 8, 8], "texture": "#2", "cullface": "east"}, - "south": {"uv": [0, 0, 16, 16], "texture": "#1", "cullface": "south"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1", "cullface": "south", "tintindex": 0}, "west": {"uv": [8, 0, 0, 8], "texture": "#2", "cullface": "west"}, "up": {"uv": [0, 0, 8, 8], "rotation": 90, "texture": "#2", "cullface": "up"}, "down": {"uv": [0, 0, 8, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 0, 0], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#3", "cullface": "north"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#3"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_cen.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_cen.json index d3406276..ce9c2524 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_cen.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_cen.json @@ -2,8 +2,9 @@ "credit": "Made with Blockbench", "texture_size": [64, 64], "textures": { - "1": "createrailwaysnavigator:block/advanced_display", "2": "createrailwaysnavigator:block/advanced_display_back", + "3": "createrailwaysnavigator:block/advanced_display_border", + "4": "createrailwaysnavigator:block/advanced_display", "particle": "createrailwaysnavigator:block/advanced_display" }, "elements": [ @@ -11,13 +12,21 @@ "from": [0, 0, 3], "to": [16, 16, 13], "faces": { - "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "north": {"uv": [0, 0, 16, 16], "texture": "#4", "tintindex": 0}, "east": {"uv": [8, 0, 13, 8], "texture": "#2", "cullface": "east"}, "south": {"uv": [0, 0, 8, 8], "texture": "#2"}, "west": {"uv": [13, 0, 8, 8], "texture": "#2", "cullface": "west"}, "up": {"uv": [8, 0, 13, 8], "rotation": 90, "texture": "#2", "cullface": "up"}, "down": {"uv": [8, 0, 13, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 0, 3], + "to": [16, 16, 13], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#3"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_double_cen.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_double_cen.json index 639116d2..014e2570 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_double_cen.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_double_cen.json @@ -4,6 +4,7 @@ "textures": { "1": "createrailwaysnavigator:block/advanced_display", "2": "createrailwaysnavigator:block/advanced_display_back", + "3": "createrailwaysnavigator:block/advanced_display_border", "particle": "createrailwaysnavigator:block/advanced_display" }, "elements": [ @@ -11,13 +12,22 @@ "from": [0, 0, 3], "to": [16, 16, 13], "faces": { - "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "north": {"uv": [0, 0, 16, 16], "texture": "#1", "tintindex": 0}, "east": {"uv": [8, 0, 13, 8], "texture": "#2", "cullface": "east"}, - "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1", "tintindex": 0}, "west": {"uv": [13, 0, 8, 8], "texture": "#2", "cullface": "west"}, "up": {"uv": [8, 0, 13, 8], "rotation": 90, "texture": "#2", "cullface": "up"}, "down": {"uv": [8, 0, 13, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 0, 3], + "to": [16, 16, 13], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#3"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#3"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_double_neg.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_double_neg.json index 4740e249..492c994d 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_double_neg.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_double_neg.json @@ -4,6 +4,7 @@ "textures": { "1": "createrailwaysnavigator:block/advanced_display", "2": "createrailwaysnavigator:block/advanced_display_back", + "3": "createrailwaysnavigator:block/advanced_display_border", "particle": "createrailwaysnavigator:block/advanced_display" }, "elements": [ @@ -11,13 +12,22 @@ "from": [0, 0, 0], "to": [16, 16, 8], "faces": { - "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "north": {"uv": [0, 0, 16, 16], "texture": "#1", "tintindex": 0}, "east": {"uv": [8, 0, 13, 8], "texture": "#2", "cullface": "east"}, - "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1", "tintindex": 0}, "west": {"uv": [13, 0, 8, 8], "texture": "#2", "cullface": "west"}, "up": {"uv": [8, 0, 13, 8], "rotation": 90, "texture": "#2", "cullface": "up"}, "down": {"uv": [8, 0, 13, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 0, 0], + "to": [16, 16, 8], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#3"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#3"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_double_pos.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_double_pos.json index a28324df..53973f43 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_double_pos.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_double_pos.json @@ -4,6 +4,7 @@ "textures": { "1": "createrailwaysnavigator:block/advanced_display", "2": "createrailwaysnavigator:block/advanced_display_back", + "3": "createrailwaysnavigator:block/advanced_display_border", "particle": "createrailwaysnavigator:block/advanced_display" }, "elements": [ @@ -11,13 +12,22 @@ "from": [0, 0, 8], "to": [16, 16, 16], "faces": { - "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "north": {"uv": [0, 0, 16, 16], "texture": "#1", "tintindex": 0}, "east": {"uv": [8, 0, 13, 8], "texture": "#2", "cullface": "east"}, - "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1", "tintindex": 0}, "west": {"uv": [13, 0, 8, 8], "texture": "#2", "cullface": "west"}, "up": {"uv": [8, 0, 13, 8], "rotation": 90, "texture": "#2", "cullface": "up"}, "down": {"uv": [8, 0, 13, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 0, 8], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#3"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#3"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_cen_cen.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_cen_cen.json index 6297c662..0de1f964 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_cen_cen.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_cen_cen.json @@ -4,20 +4,29 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 4, 6.5], "to": [16, 12, 9.5], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [13, 8, 14.5, 12], "texture": "#2", "cullface": "east"}, "south": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "south"}, "west": {"uv": [14.5, 8, 13, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2"}, "down": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 4, 6.5], + "to": [16, 12, 9.5], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_cen_neg.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_cen_neg.json index fcaa1bda..94ff9fef 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_cen_neg.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_cen_neg.json @@ -4,20 +4,29 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 4, 0], "to": [16, 12, 3], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [13, 8, 14.5, 12], "texture": "#2", "cullface": "east"}, "south": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "south"}, "west": {"uv": [14.5, 8, 13, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2"}, "down": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 4, 0], + "to": [16, 12, 3], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_cen_pos.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_cen_pos.json index 0236a56c..6ac5c0d3 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_cen_pos.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_cen_pos.json @@ -4,20 +4,29 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 4, 13], "to": [16, 12, 16], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [13, 8, 14.5, 12], "texture": "#2", "cullface": "east"}, "south": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "south"}, "west": {"uv": [14.5, 8, 13, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2"}, "down": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 4, 13], + "to": [16, 12, 16], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_cen_cen.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_cen_cen.json index 29a07ba8..dfc11fe5 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_cen_cen.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_cen_cen.json @@ -4,20 +4,30 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 4, 6.5], "to": [16, 12, 9.5], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [13, 8, 14.5, 12], "texture": "#2", "cullface": "east"}, - "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south", "tintindex": 0}, "west": {"uv": [14.5, 8, 13, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2"}, "down": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 4, 6.5], + "to": [16, 12, 9.5], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_cen_neg.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_cen_neg.json index b3b784d7..c7ee74be 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_cen_neg.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_cen_neg.json @@ -4,20 +4,30 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 4, 0], "to": [16, 12, 3], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [13, 8, 14.5, 12], "texture": "#2", "cullface": "east"}, - "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south", "tintindex": 0}, "west": {"uv": [14.5, 8, 13, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2"}, "down": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 4, 0], + "to": [16, 12, 3], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_cen_pos.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_cen_pos.json index 047f02c3..83238922 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_cen_pos.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_cen_pos.json @@ -4,20 +4,30 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 4, 13], "to": [16, 12, 16], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [13, 8, 14.5, 12], "texture": "#2", "cullface": "east"}, - "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south", "tintindex": 0}, "west": {"uv": [14.5, 8, 13, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2"}, "down": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 4, 13], + "to": [16, 12, 16], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_neg_cen.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_neg_cen.json index 067a2ca3..818c6e64 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_neg_cen.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_neg_cen.json @@ -4,20 +4,30 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 0, 6.5], "to": [16, 8, 9.5], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [13, 8, 14.5, 12], "texture": "#2", "cullface": "east"}, - "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south", "tintindex": 0}, "west": {"uv": [14.5, 8, 13, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2"}, "down": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 0, 6.5], + "to": [16, 8, 9.5], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_neg_neg.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_neg_neg.json index 7f1fba1a..5d629482 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_neg_neg.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_neg_neg.json @@ -4,20 +4,30 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 0, 0], "to": [16, 8, 3], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [13, 8, 14.5, 12], "texture": "#2", "cullface": "east"}, - "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south", "tintindex": 0}, "west": {"uv": [14.5, 8, 13, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2"}, "down": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 0, 0], + "to": [16, 8, 3], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_neg_pos.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_neg_pos.json index 0fd706c7..dd44ee88 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_neg_pos.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_neg_pos.json @@ -4,20 +4,30 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 0, 13], "to": [16, 8, 16], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [13, 8, 14.5, 12], "texture": "#2", "cullface": "east"}, - "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south", "tintindex": 0}, "west": {"uv": [14.5, 8, 13, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2"}, "down": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 0, 13], + "to": [16, 8, 16], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_pos_cen.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_pos_cen.json index 55b4de20..bc204008 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_pos_cen.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_pos_cen.json @@ -4,20 +4,30 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 8, 6.5], "to": [16, 16, 9.5], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [13, 8, 14.5, 12], "texture": "#2", "cullface": "east"}, - "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south", "tintindex": 0}, "west": {"uv": [14.5, 8, 13, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2"}, "down": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 8, 6.5], + "to": [16, 16, 9.5], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_pos_neg.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_pos_neg.json index 705a87a2..06c91448 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_pos_neg.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_pos_neg.json @@ -4,20 +4,30 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 8, 0], "to": [16, 16, 3], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [13, 8, 14.5, 12], "texture": "#2", "cullface": "east"}, - "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south", "tintindex": 0}, "west": {"uv": [14.5, 8, 13, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2"}, "down": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 8, 0], + "to": [16, 16, 3], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_pos_pos.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_pos_pos.json index 665b098c..075caf35 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_pos_pos.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_double_pos_pos.json @@ -4,20 +4,30 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 8, 13], "to": [16, 16, 16], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [13, 8, 14.5, 12], "texture": "#2", "cullface": "east"}, - "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south", "tintindex": 0}, "west": {"uv": [14.5, 8, 13, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2"}, "down": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 8, 13], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_neg_cen.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_neg_cen.json index cd5d0169..3a04e959 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_neg_cen.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_neg_cen.json @@ -4,20 +4,29 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 0, 6.5], "to": [16, 8, 9.5], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [13, 8, 14.5, 12], "texture": "#2", "cullface": "east"}, "south": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "south"}, "west": {"uv": [14.5, 8, 13, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2"}, "down": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 0, 6.5], + "to": [16, 8, 9.5], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_neg_neg.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_neg_neg.json index 949021b4..9ad74f5e 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_neg_neg.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_neg_neg.json @@ -4,20 +4,29 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 0, 0], "to": [16, 8, 3], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [13, 8, 14.5, 12], "texture": "#2", "cullface": "east"}, "south": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "south"}, "west": {"uv": [14.5, 8, 13, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2"}, "down": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 0, 0], + "to": [16, 8, 3], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_neg_pos.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_neg_pos.json index bdfe2032..8df6284d 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_neg_pos.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_neg_pos.json @@ -4,20 +4,29 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 0, 13], "to": [16, 8, 16], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [13, 8, 14.5, 12], "texture": "#2", "cullface": "east"}, "south": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "south"}, "west": {"uv": [14.5, 8, 13, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2"}, "down": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 0, 13], + "to": [16, 8, 16], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_pos_cen.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_pos_cen.json index 903787e0..4a63dba9 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_pos_cen.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_pos_cen.json @@ -4,20 +4,29 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 8, 6.5], "to": [16, 16, 9.5], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [13, 8, 14.5, 12], "texture": "#2", "cullface": "east"}, "south": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "south"}, "west": {"uv": [14.5, 8, 13, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2"}, "down": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 8, 6.5], + "to": [16, 16, 9.5], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_pos_neg.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_pos_neg.json index 74561ab5..7122ec18 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_pos_neg.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_pos_neg.json @@ -4,20 +4,29 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 8, 0], "to": [16, 16, 3], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [13, 8, 14.5, 12], "texture": "#2", "cullface": "east"}, "south": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "south"}, "west": {"uv": [14.5, 8, 13, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2"}, "down": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 8, 0], + "to": [16, 16, 3], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_pos_pos.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_pos_pos.json index ffbb04ce..a19e3dd9 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_pos_pos.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_half_panel_pos_pos.json @@ -4,20 +4,29 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 8, 13], "to": [16, 16, 16], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [13, 8, 14.5, 12], "texture": "#2", "cullface": "east"}, "south": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "south"}, "west": {"uv": [14.5, 8, 13, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2"}, "down": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 8, 13], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_neg.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_neg.json index ad91264e..4003926d 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_neg.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_neg.json @@ -4,6 +4,7 @@ "textures": { "1": "createrailwaysnavigator:block/advanced_display", "2": "createrailwaysnavigator:block/advanced_display_back", + "3": "createrailwaysnavigator:block/advanced_display_border", "particle": "createrailwaysnavigator:block/advanced_display" }, "elements": [ @@ -11,13 +12,21 @@ "from": [0, 0, 0], "to": [16, 16, 8], "faces": { - "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "north": {"uv": [0, 0, 16, 16], "texture": "#1", "tintindex": 0}, "east": {"uv": [8, 0, 13, 8], "texture": "#2", "cullface": "east"}, "south": {"uv": [0, 0, 8, 8], "texture": "#2"}, "west": {"uv": [13, 0, 8, 8], "texture": "#2", "cullface": "west"}, "up": {"uv": [8, 0, 13, 8], "rotation": 90, "texture": "#2", "cullface": "up"}, "down": {"uv": [8, 0, 13, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 0, 0], + "to": [16, 16, 8], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#3"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_panel_cen.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_panel_cen.json index 3dd79f50..f5bcf658 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_panel_cen.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_panel_cen.json @@ -4,6 +4,7 @@ "textures": { "1": "createrailwaysnavigator:block/advanced_display", "2": "createrailwaysnavigator:block/advanced_display_back", + "3": "createrailwaysnavigator:block/advanced_display_border", "particle": "createrailwaysnavigator:block/advanced_display" }, "elements": [ @@ -11,13 +12,21 @@ "from": [0, 0, 6.5], "to": [16, 16, 9.5], "faces": { - "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "north": {"uv": [0, 0, 16, 16], "texture": "#1", "tintindex": 0}, "east": {"uv": [13, 0, 14.5, 8], "texture": "#2", "cullface": "east"}, "south": {"uv": [0, 0, 8, 8], "texture": "#2", "cullface": "south"}, "west": {"uv": [14.5, 0, 13, 8], "texture": "#2", "cullface": "west"}, "up": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2", "cullface": "up"}, "down": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 0, 6.5], + "to": [16, 16, 9.5], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#3"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_panel_double_cen.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_panel_double_cen.json index 4186fbd3..51c9d9ae 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_panel_double_cen.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_panel_double_cen.json @@ -4,6 +4,7 @@ "textures": { "1": "createrailwaysnavigator:block/advanced_display", "2": "createrailwaysnavigator:block/advanced_display_back", + "3": "createrailwaysnavigator:block/advanced_display_border", "particle": "createrailwaysnavigator:block/advanced_display" }, "elements": [ @@ -11,13 +12,22 @@ "from": [0, 0, 6.5], "to": [16, 16, 9.5], "faces": { - "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "north": {"uv": [0, 0, 16, 16], "texture": "#1", "tintindex": 0}, "east": {"uv": [13, 0, 14.5, 8], "texture": "#2"}, - "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1", "tintindex": 0}, "west": {"uv": [14.5, 0, 13, 8], "texture": "#2"}, "up": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2"}, "down": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2"} } + }, + { + "name": "overlay", + "from": [0, 0, 6.5], + "to": [16, 16, 9.5], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#3"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#3"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_panel_double_neg.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_panel_double_neg.json index da9bfa45..3c753702 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_panel_double_neg.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_panel_double_neg.json @@ -4,6 +4,7 @@ "textures": { "1": "createrailwaysnavigator:block/advanced_display", "2": "createrailwaysnavigator:block/advanced_display_back", + "3": "createrailwaysnavigator:block/advanced_display_border", "particle": "createrailwaysnavigator:block/advanced_display" }, "elements": [ @@ -11,13 +12,22 @@ "from": [0, 0, 0], "to": [16, 16, 3], "faces": { - "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "north": {"uv": [0, 0, 16, 16], "texture": "#1", "tintindex": 0}, "east": {"uv": [13, 0, 14.5, 8], "texture": "#2"}, - "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1", "tintindex": 0}, "west": {"uv": [14.5, 0, 13, 8], "texture": "#2"}, "up": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2"}, "down": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2"} } + }, + { + "name": "overlay", + "from": [0, 0, 0], + "to": [16, 16, 3], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#3"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#3"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_panel_double_pos.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_panel_double_pos.json index c4f23b7e..a9a25b16 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_panel_double_pos.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_panel_double_pos.json @@ -4,6 +4,7 @@ "textures": { "1": "createrailwaysnavigator:block/advanced_display", "2": "createrailwaysnavigator:block/advanced_display_back", + "3": "createrailwaysnavigator:block/advanced_display_border", "particle": "createrailwaysnavigator:block/advanced_display" }, "elements": [ @@ -11,13 +12,22 @@ "from": [0, 0, 13], "to": [16, 16, 16], "faces": { - "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "north": {"uv": [0, 0, 16, 16], "texture": "#1", "tintindex": 0}, "east": {"uv": [13, 0, 14.5, 8], "texture": "#2"}, - "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1", "tintindex": 0}, "west": {"uv": [14.5, 0, 13, 8], "texture": "#2"}, "up": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2"}, "down": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2"} } + }, + { + "name": "overlay", + "from": [0, 0, 13], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#3"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#3"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_panel_neg.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_panel_neg.json index 25188414..acd3b57f 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_panel_neg.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_panel_neg.json @@ -4,6 +4,7 @@ "textures": { "1": "createrailwaysnavigator:block/advanced_display", "2": "createrailwaysnavigator:block/advanced_display_back", + "3": "createrailwaysnavigator:block/advanced_display_border", "particle": "createrailwaysnavigator:block/advanced_display" }, "elements": [ @@ -11,13 +12,21 @@ "from": [0, 0, 0], "to": [16, 16, 3], "faces": { - "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "north": {"uv": [0, 0, 16, 16], "texture": "#1", "tintindex": 0}, "east": {"uv": [13, 0, 14.5, 8], "texture": "#2", "cullface": "east"}, "south": {"uv": [0, 0, 8, 8], "texture": "#2", "cullface": "south"}, "west": {"uv": [14.5, 0, 13, 8], "texture": "#2", "cullface": "west"}, "up": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2", "cullface": "up"}, "down": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 0, 0], + "to": [16, 16, 3], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#3"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_panel_pos.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_panel_pos.json index 66b652e9..4b8da61e 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_panel_pos.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_panel_pos.json @@ -4,6 +4,7 @@ "textures": { "1": "createrailwaysnavigator:block/advanced_display", "2": "createrailwaysnavigator:block/advanced_display_back", + "3": "createrailwaysnavigator:block/advanced_display_border", "particle": "createrailwaysnavigator:block/advanced_display" }, "elements": [ @@ -11,13 +12,21 @@ "from": [0, 0, 13], "to": [16, 16, 16], "faces": { - "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "north": {"uv": [0, 0, 16, 16], "texture": "#1", "tintindex": 0}, "east": {"uv": [13, 0, 14.5, 8], "texture": "#2", "cullface": "east"}, "south": {"uv": [0, 0, 8, 8], "texture": "#2", "cullface": "south"}, "west": {"uv": [14.5, 0, 13, 8], "texture": "#2", "cullface": "west"}, "up": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2", "cullface": "up"}, "down": {"uv": [13, 0, 14.5, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 0, 13], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#3"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_pos.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_pos.json index e2f69e76..5923fd09 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_pos.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_pos.json @@ -4,6 +4,7 @@ "textures": { "1": "createrailwaysnavigator:block/advanced_display", "2": "createrailwaysnavigator:block/advanced_display_back", + "3": "createrailwaysnavigator:block/advanced_display_border", "particle": "createrailwaysnavigator:block/advanced_display" }, "elements": [ @@ -11,13 +12,21 @@ "from": [0, 0, 8], "to": [16, 16, 16], "faces": { - "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "north": {"uv": [0, 0, 16, 16], "texture": "#1", "tintindex": 0}, "east": {"uv": [8, 0, 13, 8], "texture": "#2", "cullface": "east"}, "south": {"uv": [0, 0, 8, 8], "texture": "#2"}, "west": {"uv": [13, 0, 8, 8], "texture": "#2", "cullface": "west"}, "up": {"uv": [8, 0, 13, 8], "rotation": 90, "texture": "#2", "cullface": "up"}, "down": {"uv": [8, 0, 13, 8], "rotation": 90, "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 0, 8], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#3"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_slab_cen.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_slab_cen.json index 9c33aad6..94464635 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_slab_cen.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_slab_cen.json @@ -4,7 +4,8 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { @@ -12,13 +13,22 @@ "to": [16, 12, 16], "rotation": {"angle": 0, "axis": "y", "origin": [0, 0, -8]}, "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "north"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "north", "tintindex": 0}, "east": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "east"}, "south": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "south"}, "west": {"uv": [8, 8, 0, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [0, 0, 8, 8], "texture": "#2"}, "down": {"uv": [0, 0, 8, 8], "texture": "#2"} } + }, + { + "name": "overlay", + "from": [0, 4, 0], + "to": [16, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0, -8]}, + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4", "cullface": "north"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_slab_double_cen.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_slab_double_cen.json index 67a2fbe4..a2ea8ef6 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_slab_double_cen.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_slab_double_cen.json @@ -4,7 +4,8 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { @@ -12,13 +13,23 @@ "to": [16, 12, 16], "rotation": {"angle": 0, "axis": "y", "origin": [0, 0, -8]}, "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "north"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "north", "tintindex": 0}, "east": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "east"}, - "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south", "tintindex": 0}, "west": {"uv": [8, 8, 0, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [0, 0, 8, 8], "texture": "#2"}, "down": {"uv": [0, 0, 8, 8], "texture": "#2"} } + }, + { + "name": "overlay", + "from": [0, 4, 0], + "to": [16, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0, -8]}, + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4", "cullface": "north"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_slab_double_neg.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_slab_double_neg.json index e566e226..937cd018 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_slab_double_neg.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_slab_double_neg.json @@ -4,7 +4,8 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { @@ -12,13 +13,23 @@ "to": [16, 8, 16], "rotation": {"angle": 0, "axis": "y", "origin": [0, -4, -8]}, "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "north"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "north", "tintindex": 0}, "east": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "east"}, - "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south", "tintindex": 0}, "west": {"uv": [8, 8, 0, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [0, 0, 8, 8], "texture": "#2"}, "down": {"uv": [0, 0, 8, 8], "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 0, 0], + "to": [16, 8, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [0, -4, -8]}, + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4", "cullface": "north"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_slab_double_pos.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_slab_double_pos.json index 146c2ec8..0838d72f 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_slab_double_pos.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_slab_double_pos.json @@ -4,7 +4,8 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { @@ -12,13 +13,23 @@ "to": [16, 16, 16], "rotation": {"angle": 0, "axis": "y", "origin": [0, 4, -8]}, "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "north"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "north", "tintindex": 0}, "east": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "east"}, - "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south", "tintindex": 0}, "west": {"uv": [8, 8, 0, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [0, 0, 8, 8], "texture": "#2", "cullface": "up"}, "down": {"uv": [0, 0, 8, 8], "texture": "#2"} } + }, + { + "name": "overlay", + "from": [0, 8, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 4, -8]}, + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4", "cullface": "north"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_slab_neg.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_slab_neg.json index 37d2a568..536f8323 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_slab_neg.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_slab_neg.json @@ -4,7 +4,8 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { @@ -12,13 +13,22 @@ "to": [16, 8, 16], "rotation": {"angle": 0, "axis": "y", "origin": [0, -4, -8]}, "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "north"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "north", "tintindex": 0}, "east": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "east"}, "south": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "south"}, "west": {"uv": [8, 8, 0, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [0, 0, 8, 8], "texture": "#2"}, "down": {"uv": [0, 0, 8, 8], "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 0, 0], + "to": [16, 8, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [0, -4, -8]}, + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4", "cullface": "north"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_slab_pos.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_slab_pos.json index 6bf910ae..6c7d7620 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_slab_pos.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_slab_pos.json @@ -4,7 +4,8 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { @@ -12,13 +13,22 @@ "to": [16, 16, 16], "rotation": {"angle": 0, "axis": "y", "origin": [0, 4, -8]}, "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "north"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "north", "tintindex": 0}, "east": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "east"}, "south": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "south"}, "west": {"uv": [8, 8, 0, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [0, 0, 8, 8], "texture": "#2", "cullface": "up"}, "down": {"uv": [0, 0, 8, 8], "texture": "#2"} } + }, + { + "name": "overlay", + "from": [0, 8, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 4, -8]}, + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4", "cullface": "north"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_sloped.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_sloped.json index f0bf0054..fc429cda 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_sloped.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_sloped.json @@ -4,7 +4,8 @@ "textures": { "1": "createrailwaysnavigator:block/advanced_display_small", "2": "createrailwaysnavigator:block/advanced_display_back", - "particle": "createrailwaysnavigator:block/advanced_display" + "3": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { @@ -48,24 +49,42 @@ "faces": { "north": {"uv": [0, 8, 8, 12], "texture": "#2"}, "east": {"uv": [0, 0, 0.5, 4], "texture": "#2"}, - "south": {"uv": [0, 0, 16, 8], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#1", "tintindex": 0}, "west": {"uv": [0, 0, 0.5, 4], "texture": "#2"}, "up": {"uv": [0, 0, 8, 0.5], "texture": "#2"}, "down": {"uv": [0, 0, 8, 0.5], "texture": "#2"} } }, + { + "name": "overlay", + "from": [0, 7, 10], + "to": [16, 16, 11], + "rotation": {"angle": 22.5, "axis": "x", "origin": [8, 8, 12]}, + "faces": { + "south": {"uv": [0, 0, 16, 8], "texture": "#3"} + } + }, { "from": [0, 7, 5], "to": [16, 16, 6], "rotation": {"angle": -22.5, "axis": "x", "origin": [8, 8, 4]}, "faces": { - "north": {"uv": [0, 0, 15.8, 8], "texture": "#1"}, + "north": {"uv": [0, 0, 15.8, 8], "texture": "#1", "tintindex": 0}, "east": {"uv": [0, 0, 0.5, 4], "texture": "#2"}, "south": {"uv": [0, 8, 8, 12], "texture": "#2"}, "west": {"uv": [0, 0, 0.5, 4], "texture": "#2"}, "up": {"uv": [0, 0, 8, 0.5], "texture": "#2"}, "down": {"uv": [0, 0, 8, 0.5], "texture": "#2"} } + }, + { + "name": "overlay", + "from": [0, 7, 5], + "to": [16, 16, 6], + "rotation": {"angle": -22.5, "axis": "x", "origin": [8, 8, 4]}, + "faces": { + "north": {"uv": [0, 0, 15.8, 8], "texture": "#3"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_cen_cen.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_cen_cen.json index dc8e01b8..aaa52c9a 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_cen_cen.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_cen_cen.json @@ -4,20 +4,29 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 4, 4], "to": [16, 12, 12], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [8, 8, 12, 12], "texture": "#2", "cullface": "east"}, "south": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "south"}, "west": {"uv": [12, 8, 8, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [0, 8, 8, 12], "texture": "#2"}, "down": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 4, 4], + "to": [16, 12, 12], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_cen_neg.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_cen_neg.json index 2145cfef..629f67f7 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_cen_neg.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_cen_neg.json @@ -4,20 +4,29 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 4, 0], "to": [16, 12, 8], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [8, 8, 12, 12], "texture": "#2", "cullface": "east"}, "south": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "south"}, "west": {"uv": [12, 8, 8, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [0, 8, 8, 12], "texture": "#2"}, "down": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 4, 0], + "to": [16, 12, 8], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_cen_pos.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_cen_pos.json index 02e5cb55..4d825f53 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_cen_pos.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_cen_pos.json @@ -4,20 +4,29 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 4, 8], "to": [16, 12, 16], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [8, 8, 12, 12], "texture": "#2", "cullface": "east"}, "south": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "south"}, "west": {"uv": [12, 8, 8, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [0, 8, 8, 12], "texture": "#2"}, "down": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 4, 8], + "to": [16, 12, 16], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_cen_cen.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_cen_cen.json index e8a11ee4..8f831bfb 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_cen_cen.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_cen_cen.json @@ -4,20 +4,30 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 4, 4], "to": [16, 12, 12], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [8, 8, 12, 12], "texture": "#2", "cullface": "east"}, - "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south", "tintindex": 0}, "west": {"uv": [12, 8, 8, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [0, 8, 8, 12], "texture": "#2"}, "down": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 4, 4], + "to": [16, 12, 12], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_cen_neg.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_cen_neg.json index 220b57cc..3c227049 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_cen_neg.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_cen_neg.json @@ -4,20 +4,30 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 4, 0], "to": [16, 12, 8], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [8, 8, 12, 12], "texture": "#2", "cullface": "east"}, - "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south", "tintindex": 0}, "west": {"uv": [12, 8, 8, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [0, 8, 8, 12], "texture": "#2"}, "down": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 4, 0], + "to": [16, 12, 8], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_cen_pos.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_cen_pos.json index ff3f3ddd..81a59914 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_cen_pos.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_cen_pos.json @@ -4,20 +4,30 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 4, 8], "to": [16, 12, 16], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [8, 8, 12, 12], "texture": "#2", "cullface": "east"}, - "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south", "tintindex": 0}, "west": {"uv": [12, 8, 8, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [0, 8, 8, 12], "texture": "#2"}, "down": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 4, 8], + "to": [16, 12, 16], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_neg_cen.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_neg_cen.json index 3b37befa..221c945e 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_neg_cen.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_neg_cen.json @@ -4,20 +4,30 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 0, 4], "to": [16, 8, 12], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [8, 8, 12, 12], "texture": "#2", "cullface": "east"}, - "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south", "tintindex": 0}, "west": {"uv": [12, 8, 8, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [0, 8, 8, 12], "texture": "#2"}, "down": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 0, 4], + "to": [16, 8, 12], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_neg_neg.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_neg_neg.json index 1ca936e5..a733eb68 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_neg_neg.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_neg_neg.json @@ -4,20 +4,30 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 0, 0], "to": [16, 8, 8], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [8, 8, 12, 12], "texture": "#2", "cullface": "east"}, - "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south", "tintindex": 0}, "west": {"uv": [12, 8, 8, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [0, 8, 8, 12], "texture": "#2"}, "down": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 0, 0], + "to": [16, 8, 8], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_neg_pos.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_neg_pos.json index ab2d6e1f..e1296df0 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_neg_pos.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_neg_pos.json @@ -4,20 +4,30 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 0, 8], "to": [16, 8, 16], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [8, 8, 12, 12], "texture": "#2", "cullface": "east"}, - "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south", "tintindex": 0}, "west": {"uv": [12, 8, 8, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [0, 8, 8, 12], "texture": "#2"}, "down": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 0, 8], + "to": [16, 8, 16], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_pos_cen.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_pos_cen.json index 51ec6752..bbceeb36 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_pos_cen.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_pos_cen.json @@ -4,20 +4,30 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 8, 4], "to": [16, 16, 12], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [8, 8, 12, 12], "texture": "#2", "cullface": "east"}, - "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south", "tintindex": 0}, "west": {"uv": [12, 8, 8, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [0, 8, 8, 12], "texture": "#2"}, "down": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 8, 4], + "to": [16, 16, 12], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_pos_neg.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_pos_neg.json index e2a71ee3..bc423a06 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_pos_neg.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_pos_neg.json @@ -4,20 +4,30 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 8, 0], "to": [16, 16, 8], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [8, 8, 12, 12], "texture": "#2", "cullface": "east"}, - "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south", "tintindex": 0}, "west": {"uv": [12, 8, 8, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [0, 8, 8, 12], "texture": "#2"}, "down": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 8, 0], + "to": [16, 16, 8], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_pos_pos.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_pos_pos.json index 1d21826b..f999adc9 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_pos_pos.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_double_pos_pos.json @@ -4,20 +4,30 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 8, 8], "to": [16, 16, 16], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [8, 8, 12, 12], "texture": "#2", "cullface": "east"}, - "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#3", "cullface": "south", "tintindex": 0}, "west": {"uv": [12, 8, 8, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [0, 8, 8, 12], "texture": "#2"}, "down": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 8, 8], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_neg_cen.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_neg_cen.json index f69ec022..16533a3f 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_neg_cen.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_neg_cen.json @@ -4,20 +4,29 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 0, 4], "to": [16, 8, 12], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [8, 8, 12, 12], "texture": "#2", "cullface": "east"}, "south": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "south"}, "west": {"uv": [12, 8, 8, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [0, 8, 8, 12], "texture": "#2"}, "down": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 0, 4], + "to": [16, 8, 12], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_neg_neg.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_neg_neg.json index 68cb9b74..16ff955b 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_neg_neg.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_neg_neg.json @@ -4,20 +4,29 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 0, 0], "to": [16, 8, 8], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [8, 8, 12, 12], "texture": "#2", "cullface": "east"}, "south": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "south"}, "west": {"uv": [12, 8, 8, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [0, 8, 8, 12], "texture": "#2"}, "down": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 0, 0], + "to": [16, 8, 8], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_neg_pos.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_neg_pos.json index 8a095f5c..0eb13425 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_neg_pos.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_neg_pos.json @@ -4,20 +4,29 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 0, 8], "to": [16, 8, 16], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [8, 8, 12, 12], "texture": "#2", "cullface": "east"}, "south": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "south"}, "west": {"uv": [12, 8, 8, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [0, 8, 8, 12], "texture": "#2"}, "down": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 0, 8], + "to": [16, 8, 16], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_pos_cen.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_pos_cen.json index f4d2d8e6..13d86ee7 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_pos_cen.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_pos_cen.json @@ -4,20 +4,29 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 8, 4], "to": [16, 16, 12], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [8, 8, 12, 12], "texture": "#2", "cullface": "east"}, "south": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "south"}, "west": {"uv": [12, 8, 8, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [0, 8, 8, 12], "texture": "#2"}, "down": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 8, 4], + "to": [16, 16, 12], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_pos_neg.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_pos_neg.json index 19c6f579..5f526d32 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_pos_neg.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_pos_neg.json @@ -4,20 +4,29 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 8, 0], "to": [16, 16, 8], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [8, 8, 12, 12], "texture": "#2", "cullface": "east"}, "south": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "south"}, "west": {"uv": [12, 8, 8, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [0, 8, 8, 12], "texture": "#2"}, "down": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 8, 0], + "to": [16, 16, 8], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_pos_pos.json b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_pos_pos.json index ab7ed260..c83a68f9 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_pos_pos.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/block/advanced_display_small_pos_pos.json @@ -4,20 +4,29 @@ "textures": { "2": "createrailwaysnavigator:block/advanced_display_back", "3": "createrailwaysnavigator:block/advanced_display_small", - "particle": "createrailwaysnavigator:block/advanced_display" + "4": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { "from": [0, 8, 8], "to": [16, 16, 16], "faces": { - "north": {"uv": [0, 0, 16, 8], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 8], "texture": "#3", "tintindex": 0}, "east": {"uv": [8, 8, 12, 12], "texture": "#2", "cullface": "east"}, "south": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "south"}, "west": {"uv": [12, 8, 8, 12], "texture": "#2", "cullface": "west"}, "up": {"uv": [0, 8, 8, 12], "texture": "#2"}, "down": {"uv": [0, 8, 8, 12], "texture": "#2", "cullface": "down"} } + }, + { + "name": "overlay", + "from": [0, 8, 8], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/models/item/advanced_display_sloped.json b/common/src/main/resources/assets/createrailwaysnavigator/models/item/advanced_display_sloped.json index 07b19dce..fc429cda 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/models/item/advanced_display_sloped.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/models/item/advanced_display_sloped.json @@ -4,7 +4,8 @@ "textures": { "1": "createrailwaysnavigator:block/advanced_display_small", "2": "createrailwaysnavigator:block/advanced_display_back", - "particle": "createrailwaysnavigator:block/advanced_display_small_connected" + "3": "createrailwaysnavigator:block/advanced_display_small_border", + "particle": "createrailwaysnavigator:block/advanced_display_small_border" }, "elements": [ { @@ -38,7 +39,7 @@ "faces": { "east": {"uv": [1.375, 0, 6.625, 1], "texture": "#2"}, "west": {"uv": [1.375, 0, 6.625, 1], "texture": "#2"}, - "up": {"uv": [0, 1.375, 8, 6.625], "texture": "#2"} + "up": {"uv": [0, 1.375, 8, 6.625], "texture": "#2", "cullface": "up"} } }, { @@ -48,24 +49,42 @@ "faces": { "north": {"uv": [0, 8, 8, 12], "texture": "#2"}, "east": {"uv": [0, 0, 0.5, 4], "texture": "#2"}, - "south": {"uv": [0, 0, 16, 8], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#1", "tintindex": 0}, "west": {"uv": [0, 0, 0.5, 4], "texture": "#2"}, "up": {"uv": [0, 0, 8, 0.5], "texture": "#2"}, "down": {"uv": [0, 0, 8, 0.5], "texture": "#2"} } }, + { + "name": "overlay", + "from": [0, 7, 10], + "to": [16, 16, 11], + "rotation": {"angle": 22.5, "axis": "x", "origin": [8, 8, 12]}, + "faces": { + "south": {"uv": [0, 0, 16, 8], "texture": "#3"} + } + }, { "from": [0, 7, 5], "to": [16, 16, 6], "rotation": {"angle": -22.5, "axis": "x", "origin": [8, 8, 4]}, "faces": { - "north": {"uv": [0, 0, 15.8, 8], "texture": "#1"}, + "north": {"uv": [0, 0, 15.8, 8], "texture": "#1", "tintindex": 0}, "east": {"uv": [0, 0, 0.5, 4], "texture": "#2"}, "south": {"uv": [0, 8, 8, 12], "texture": "#2"}, "west": {"uv": [0, 0, 0.5, 4], "texture": "#2"}, "up": {"uv": [0, 0, 8, 0.5], "texture": "#2"}, "down": {"uv": [0, 0, 8, 0.5], "texture": "#2"} } + }, + { + "name": "overlay", + "from": [0, 7, 5], + "to": [16, 16, 6], + "rotation": {"angle": -22.5, "axis": "x", "origin": [8, 8, 4]}, + "faces": { + "north": {"uv": [0, 0, 15.8, 8], "texture": "#3"} + } } ], "display": { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display.png b/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display.png index ae15e2bd..33891c50 100644 Binary files a/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display.png and b/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display.png differ diff --git a/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display.xcf b/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display.xcf new file mode 100644 index 00000000..78c754d8 Binary files /dev/null and b/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display.xcf differ diff --git a/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_border.png b/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_border.png new file mode 100644 index 00000000..da6d3996 Binary files /dev/null and b/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_border.png differ diff --git a/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_border_connected.png b/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_border_connected.png new file mode 100644 index 00000000..b06d64c7 Binary files /dev/null and b/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_border_connected.png differ diff --git a/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_connected.png b/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_connected.png index 256bd1f0..f4cd4803 100644 Binary files a/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_connected.png and b/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_connected.png differ diff --git a/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_small.png b/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_small.png index 05d3150e..069e4cf0 100644 Binary files a/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_small.png and b/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_small.png differ diff --git a/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_small.xcf b/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_small.xcf new file mode 100644 index 00000000..d132d52b Binary files /dev/null and b/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_small.xcf differ diff --git a/common/src/main/resources/assets/createrailwaysnavigator/textures/gui/settings.png b/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_small_border.png similarity index 53% rename from common/src/main/resources/assets/createrailwaysnavigator/textures/gui/settings.png rename to common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_small_border.png index 2c89e976..f40a715c 100644 Binary files a/common/src/main/resources/assets/createrailwaysnavigator/textures/gui/settings.png and b/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_small_border.png differ diff --git a/common/src/main/resources/assets/createrailwaysnavigator/textures/gui/route_details.png b/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_small_border_connected.png similarity index 51% rename from common/src/main/resources/assets/createrailwaysnavigator/textures/gui/route_details.png rename to common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_small_border_connected.png index b7cdc286..25ea754e 100644 Binary files a/common/src/main/resources/assets/createrailwaysnavigator/textures/gui/route_details.png and b/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_small_border_connected.png differ diff --git a/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_small_connected.png b/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_small_connected.png index 99f70336..76c86708 100644 Binary files a/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_small_connected.png and b/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_small_connected.png differ diff --git a/common/src/main/resources/assets/createrailwaysnavigator/textures/gui/advanced_display_settings.png b/common/src/main/resources/assets/createrailwaysnavigator/textures/gui/advanced_display_settings.png deleted file mode 100644 index c78d48e8..00000000 Binary files a/common/src/main/resources/assets/createrailwaysnavigator/textures/gui/advanced_display_settings.png and /dev/null differ diff --git a/common/src/main/resources/assets/createrailwaysnavigator/textures/gui/gui.png b/common/src/main/resources/assets/createrailwaysnavigator/textures/gui/gui.png index e77d23ee..0c7b81a1 100644 Binary files a/common/src/main/resources/assets/createrailwaysnavigator/textures/gui/gui.png and b/common/src/main/resources/assets/createrailwaysnavigator/textures/gui/gui.png differ diff --git a/common/src/main/resources/assets/createrailwaysnavigator/textures/gui/icons.png b/common/src/main/resources/assets/createrailwaysnavigator/textures/gui/icons.png index 7f9006bf..fc48ec58 100644 Binary files a/common/src/main/resources/assets/createrailwaysnavigator/textures/gui/icons.png and b/common/src/main/resources/assets/createrailwaysnavigator/textures/gui/icons.png differ diff --git a/common/src/main/resources/assets/createrailwaysnavigator/textures/gui/navigator.png b/common/src/main/resources/assets/createrailwaysnavigator/textures/gui/navigator.png deleted file mode 100644 index 0dc23cc8..00000000 Binary files a/common/src/main/resources/assets/createrailwaysnavigator/textures/gui/navigator.png and /dev/null differ diff --git a/common/src/main/resources/assets/createrailwaysnavigator/textures/gui/settings_widgets.png b/common/src/main/resources/assets/createrailwaysnavigator/textures/gui/settings_widgets.png deleted file mode 100644 index a632cfbd..00000000 Binary files a/common/src/main/resources/assets/createrailwaysnavigator/textures/gui/settings_widgets.png and /dev/null differ diff --git a/common/src/main/resources/createrailwaysnavigator.mixins.json b/common/src/main/resources/createrailwaysnavigator.mixins.json index e4c0bd9b..78928a93 100644 --- a/common/src/main/resources/createrailwaysnavigator.mixins.json +++ b/common/src/main/resources/createrailwaysnavigator.mixins.json @@ -1,12 +1,13 @@ { "required": true, - "package": "de.mrjulsen.crn.mixin", + "package": "${maven_group}.mixin", "compatibilityLevel": "JAVA_17", "minVersion": "0.8", "client": [ "ScheduleScreenAccessor", "ModularGuiLineBuilderAccessor", - "ScheduleScreenMixin" + "ScheduleScreenMixin", + "StationBlockEntityMixin" ], "mixins": [ "ScheduleRuntimeAccessor", @@ -16,7 +17,9 @@ "ScheduleRuntimeMixin", "GlobalTrainDisplayDataMixin", "TrainMixin", - "ReloadableServerResourcesMixin" + "ItemMixin", + "NavigationMixin", + "ScheduleEntryMixin" ], "injectors": { "defaultRequire": 1 diff --git a/fabric/build.gradle b/fabric/build.gradle index a4382f73..376237a1 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -34,7 +34,7 @@ dependencies { modImplementation("net.minecraftforge:forgeconfigapiport-fabric:${rootProject.forge_config_api_port_version}") modImplementation(include("de.mrjulsen.mcdragonlib:dragonlib-fabric:${rootProject.minecraft_version}-${rootProject.dragonlib_version}")) -modImplementation("com.simibubi.create:create-fabric-${rootProject.minecraft_version}:${rootProject.create_fabric_version}") + modImplementation("com.simibubi.create:create-fabric-${rootProject.minecraft_version}:${rootProject.create_fabric_version}") common(project(path: ':common', configuration: 'namedElements')) { transitive false } shadowBundle project(path: ':common', configuration: 'transformProductionFabric') diff --git a/fabric/src/main/resources/createrailwaysnavigator.accesswidener b/fabric/src/main/resources/createrailwaysnavigator.accesswidener new file mode 100644 index 00000000..4d681a3f --- /dev/null +++ b/fabric/src/main/resources/createrailwaysnavigator.accesswidener @@ -0,0 +1,3 @@ +accessWidener v2 named +accessible class net/minecraft/client/gui/Font$StringRenderOutput +accessible field net/minecraft/client/gui/screens/inventory/AbstractContainerScreen topPos I \ No newline at end of file diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index e42cd924..56547834 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -1,34 +1,43 @@ { "schemaVersion": 1, - "id": "createrailwaysnavigator", + "id": "${modid}", "version": "${version}", - "name": "Create Railways Navigator", - "description": "Get possible train connections in your world from one station to another using the Create Railways Navigator. An addon for the Create Mod.", + "name": "${display_name}", + "description": "${description}", "authors": [ - "MrJulsen" + "${authors}" ], "contact": { - "homepage": "https://www.curseforge.com/minecraft/mc-mods/create-railways-navigator", - "issues": "https://github.com/MisterJulsen/Create-Train-Navigator/issues", - "sources": "https://github.com/MisterJulsen/Create-Train-Navigator" + "homepage": "${homepage}", + "issues": "${issues}", + "sources": "${source}" }, - "license": "GNU General Public License v3.0", - "icon": "icon.png", + "license": "${license}", + "icon": "${icon}", "environment": "*", "entrypoints": { "main": [ - "de.mrjulsen.crn.fabric.CreateRailwaysNavigatorFabric" + "${maven_group}.fabric.${main_class_name}Fabric" ] }, "mixins": [ - "createrailwaysnavigator.mixins.json" + "${modid}.mixins.json" ], "depends": { - "fabric": "*", - "minecraft": ">=1.19.2", - "architectury": ">=6.5.85", - "dragonlib": ">=1.19.2-2.2.16", - "create": "*" + "fabricloader": ">=${fabric_loader_version}", + "minecraft": "~${minecraft_version}", + "java": ">=${java_version}", + "dragonlib": ">=${dragonlib_version}", + "create": "*", + "fabric-api": "*" }, - "accessWidener": "createrailwaysnavigator.accesswidener" -} \ No newline at end of file + "custom": { + "modmenu": { + "links": { + "Discord": "${discord}" + }, + "update_checker": true + } + }, + "accessWidener": "${modid}.accesswidener" +} diff --git a/forge/build.gradle b/forge/build.gradle index 7fdb673d..31926da9 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -38,9 +38,7 @@ dependencies { modCompileOnly("dev.architectury:architectury-forge:${rootProject.architectury_api_version}") modImplementation(include("de.mrjulsen.mcdragonlib:dragonlib-forge:${rootProject.minecraft_version}-${rootProject.dragonlib_version}")) - modImplementation("net.minecraftforge:forgeconfigapiport-fabric:${rootProject.forge_config_api_port_version}") - modImplementation("com.electronwill.night-config:toml:3.6.0") - + modImplementation("com.simibubi.create:create-${rootProject.minecraft_version}:${rootProject.create_forge_version}:slim") { transitive = false } modImplementation("com.tterrag.registrate:Registrate:${rootProject.registrate_forge_version}") modImplementation("com.jozufozu.flywheel:flywheel-forge-${rootProject.minecraft_version}:${rootProject.flywheel_forge_version}") diff --git a/forge/src/main/java/de/mrjulsen/crn/forge/CRNPlatformSpecificClientImpl.java b/forge/src/main/java/de/mrjulsen/crn/forge/CRNPlatformSpecificClientImpl.java index 620bf805..fb3ba350 100644 --- a/forge/src/main/java/de/mrjulsen/crn/forge/CRNPlatformSpecificClientImpl.java +++ b/forge/src/main/java/de/mrjulsen/crn/forge/CRNPlatformSpecificClientImpl.java @@ -7,11 +7,8 @@ import com.simibubi.create.foundation.block.connected.ConnectedTextureBehaviour; import com.simibubi.create.foundation.utility.RegisteredObjects; -import de.mrjulsen.crn.CreateRailwaysNavigator; import net.minecraft.world.level.block.Block; -import net.minecraftforge.fml.common.Mod; -@Mod(CreateRailwaysNavigator.MOD_ID) public class CRNPlatformSpecificClientImpl { public static void registerCTBehviour(Block entry, Supplier behaviorSupplier) { diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml index abfbcae1..781ccc9e 100644 --- a/forge/src/main/resources/META-INF/mods.toml +++ b/forge/src/main/resources/META-INF/mods.toml @@ -1,52 +1,42 @@ modLoader = "javafml" -loaderVersion = "[43,)" -#issueTrackerURL = "" -license = "GNU General Public License v3.0" +loaderVersion = "[${forge_version_int},)" +issueTrackerURL = "${issues}" +license = "${license}" [[mods]] -modId = "createrailwaysnavigator" +modId = "${modid}" version = "${version}" -displayName = "Create Railways Navigator" -authors = "MrJulsen" -updateJSONURL="https://raw.githubusercontent.com/MisterJulsen/Create-Train-Navigator/1.19.2/update.json" -displayURL="https://www.curseforge.com/minecraft/mc-mods/create-railways-navigator" -issueTrackerURL="https://github.com/MisterJulsen/Create-Train-Navigator/issues" -description = ''' -Get possible train connections in your world from one station to another using the Create Railways Navigator. An addon for the Create Mod. -''' -logoFile="icon.png" +displayName = "${display_name}" +displayUrl="${homepage}" +authors = "${authors}" +description = '''${description}''' +logoFile = "${icon}" -[[dependencies.createrailwaysnavigator]] +[[dependencies.${modid}]] modId = "forge" mandatory = true -versionRange = "[43,)" +versionRange = "[${forge_version_int},)" ordering = "NONE" side = "BOTH" -[[dependencies.createrailwaysnavigator]] +[[dependencies.${modid}]] modId = "minecraft" mandatory = true -versionRange = "[1.19.2,)" +versionRange = "[${minecraft_version},${next_unsupported_minecraft_version})" ordering = "NONE" side = "BOTH" -[[dependencies.createrailwaysnavigator]] -modId = "architectury" -mandatory = true -versionRange = "[6.5.85,)" -ordering = "AFTER" -side = "BOTH" - -[[dependencies.createrailwaysnavigator]] +[[dependencies.${modid}]] modId = "dragonlib" mandatory = true -versionRange = "[1.19.2-2.2.16,)" -ordering = "AFTER" +versionRange = "[${dragonlib_version},)" +ordering = "BEFORE" side = "BOTH" -[[dependencies.createrailwaysnavigator]] + +[[dependencies.${modid}]] modId = "create" mandatory = true -versionRange = "[0.5.1.f,)" -ordering = "AFTER" +versionRange = "[${create_forge_version},)" +ordering = "BEFORE" side = "BOTH" \ No newline at end of file diff --git a/forge/src/main/resources/pack.mcmeta b/forge/src/main/resources/pack.mcmeta index 9252d3db..2eb93b44 100644 --- a/forge/src/main/resources/pack.mcmeta +++ b/forge/src/main/resources/pack.mcmeta @@ -1,6 +1,7 @@ { "pack": { - "description": "Example Mod", - "pack_format": 8 + "description": "${display_name}", + "forge:data_pack_format": 9, + "pack_format": 9 } } diff --git a/gradle.properties b/gradle.properties index 38fadcf8..56ad0c6c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,27 +1,43 @@ # Done to increase the memory available to Gradle. -org.gradle.jvmargs=-Xmx6G +org.gradle.jvmargs=-Xmx8G org.gradle.parallel=true # Mod properties -mod_version = 0.6.0 +mod_version = 0.7.0 release_channel = beta maven_group = de.mrjulsen.crn archives_name = createrailwaysnavigator +main_class_name = CreateRailwaysNavigator enabled_platforms = fabric,forge +java_version = 17 +datapack_version = 10 + +# Mod Info +display_name = Create Railways Navigator +authors = MrJulsen +description = Get possible train connections in your world from one station to another using the Create Railways Navigator. An addon for the Create Mod. +homepage = https://www.curseforge.com/minecraft/mc-mods/create-railways-navigator +issues = https://github.com/MisterJulsen/Create-Train-Navigator/issues +source = https://github.com/MisterJulsen/Create-Train-Navigator +license = GNU General Public License v3.0 +icon = icon.png +discord = https://discord.gg/AeSbNgvc7f # Minecraft properties minecraft_version = 1.19.2 parchment_version = 2022.11.27 +next_unsupported_minecraft_version=1.20 # Dependencies architectury_api_version = 6.5.85 fabric_loader_version = 0.15.11 fabric_api_version = 0.77.0+1.19.2 forge_version = 1.19.2-43.3.13 +forge_version_int = 43 -dragonlib_version = 2.2.16 -modmenu_version=4.1.2 -forge_config_api_port_version=4.2.11 +dragonlib_version = 2.2.21 +modmenu_version = 4.1.2 +forge_config_api_port_version = 4.2.11 create_fabric_version = 0.5.1-f-build.1416+mc1.19.2 create_forge_version = 0.5.1.f-46 registrate_forge_version = MC1.19-1.1.5 diff --git a/settings.gradle b/settings.gradle index ccd48de9..5ff73e23 100644 --- a/settings.gradle +++ b/settings.gradle @@ -2,7 +2,7 @@ pluginManagement { repositories { maven { url "https://maven.fabricmc.net/" } maven { url "https://maven.architectury.dev/" } - maven { url "https://files.minecraftforge.net/maven/" } + maven { url "https://maven.minecraftforge.net/" } gradlePluginPortal() } } @@ -11,4 +11,4 @@ include("common") include("fabric") include("forge") -rootProject.name = "CRN" +rootProject.name = "Create Railways Navigator" diff --git a/update.json b/update.json index 7ae6eccb..8e6347d0 100644 --- a/update.json +++ b/update.json @@ -1,7 +1,7 @@ { "promos": { - "1.19.2-latest": "0.5.3-1.19.2", - "1.19.2-recommended": "0.5.3-1.19.2" + "1.18.2-latest": "0.5.3-1.18.2", + "1.18.2-recommended": "0.5.3-1.18.2" }, "homepage": "https://www.curseforge.com/minecraft/mc-mods/create-railways-navigator" } \ No newline at end of file