diff --git a/src/main/java/me/ellieis/Sabotage/game/config/SabotageConfig.java b/src/main/java/me/ellieis/Sabotage/game/config/SabotageConfig.java index b15298d..e475bb2 100644 --- a/src/main/java/me/ellieis/Sabotage/game/config/SabotageConfig.java +++ b/src/main/java/me/ellieis/Sabotage/game/config/SabotageConfig.java @@ -6,10 +6,11 @@ import xyz.nucleoid.fantasy.Fantasy; import xyz.nucleoid.plasmid.game.common.config.PlayerConfig; -public record SabotageConfig(Identifier map, Identifier dimension, int countdownTime, int gracePeriod, int timeLimit, int endDelay, int chestCount, InnocentConfig innocentConfig, DetectiveConfig detectiveConfig, SaboteurConfig saboteurConfig, PlayerConfig playerConfig) { +public record SabotageConfig(Identifier map, int time, Identifier dimension, int countdownTime, int gracePeriod, int timeLimit, int endDelay, int chestCount, InnocentConfig innocentConfig, DetectiveConfig detectiveConfig, SaboteurConfig saboteurConfig, PlayerConfig playerConfig) { public static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( Identifier.CODEC.fieldOf("map").forGetter(SabotageConfig::map), + Codec.INT.optionalFieldOf("time", 6000).forGetter(SabotageConfig::time), Identifier.CODEC.optionalFieldOf("dimension", Fantasy.DEFAULT_DIM_TYPE.getValue()).forGetter(SabotageConfig::dimension), Codec.INT.optionalFieldOf("countdown_time", 5).forGetter(SabotageConfig::countdownTime), Codec.INT.optionalFieldOf("grace_period", 15).forGetter(SabotageConfig::gracePeriod), diff --git a/src/main/java/me/ellieis/Sabotage/game/phase/SabotageWaiting.java b/src/main/java/me/ellieis/Sabotage/game/phase/SabotageWaiting.java index 9c7c7b0..ae55b14 100644 --- a/src/main/java/me/ellieis/Sabotage/game/phase/SabotageWaiting.java +++ b/src/main/java/me/ellieis/Sabotage/game/phase/SabotageWaiting.java @@ -55,8 +55,7 @@ public static GameOpenProcedure Open(GameOpenContext context) { RuntimeWorldConfig worldConfig = new RuntimeWorldConfig() .setGenerator(map.asChunkGenerator(server)) .setDimensionType(RegistryKey.of(RegistryKeys.DIMENSION_TYPE, config.dimension())) - .setTimeOfDay(6000); - + .setTimeOfDay(config.time()); return context.openWithWorld(worldConfig, (activity, world) -> { SabotageWaiting game = new SabotageWaiting(config, activity.getGameSpace(), map, world); GameWaitingLobby.addTo(activity, config.playerConfig()); diff --git a/src/main/resources/data/sabotage/games/skybound.json b/src/main/resources/data/sabotage/games/skybound.json index f7f3f7a..b1df2e4 100644 --- a/src/main/resources/data/sabotage/games/skybound.json +++ b/src/main/resources/data/sabotage/games/skybound.json @@ -1,6 +1,7 @@ { "type": "sabotage:sabotage", "map": "sabotage:skybound", + "time": 15000, "chest_count": 75, "players": { "min": 1, diff --git a/src/main/resources/data/sabotage/games/village.json b/src/main/resources/data/sabotage/games/village.json index 3e58c79..c437c7d 100644 --- a/src/main/resources/data/sabotage/games/village.json +++ b/src/main/resources/data/sabotage/games/village.json @@ -1,6 +1,7 @@ { "type": "sabotage:sabotage", "map": "sabotage:village", + "time": 0, "chest_count": 125, "players": { "min": 1, diff --git a/src/main/resources/data/sabotage/map_templates/skybound.nbt b/src/main/resources/data/sabotage/map_templates/skybound.nbt index ac6efc2..6cb13ff 100644 Binary files a/src/main/resources/data/sabotage/map_templates/skybound.nbt and b/src/main/resources/data/sabotage/map_templates/skybound.nbt differ