Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
Tower defence(1st iteration)
Browse files Browse the repository at this point in the history
Signed-off-by: John Doe <john@daylifecraft.com>
  • Loading branch information
John Doe committed Apr 14, 2024
1 parent fc77cb1 commit 23488a4
Show file tree
Hide file tree
Showing 200 changed files with 5,158 additions and 181 deletions.
2 changes: 1 addition & 1 deletion .run/Run server.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
</component>
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
kotlin("jvm") version "1.9.23"
kotlin("jvm") version "1.9.23" apply false
jacoco
id("io.gitlab.arturbosch.detekt") version "1.23.6"
id("org.sonarqube") version "5.0.0.4638"
Expand Down
2 changes: 1 addition & 1 deletion common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repositories {

dependencies {
api(kotlin("stdlib-jdk8"))
api("net.minestom:minestom-snapshots:0c9527118a")
api("net.minestom:minestom-snapshots:improved-pathfinding-9cade8766c")

api("io.prometheus:prometheus-metrics-core:1.2.1")
api("io.prometheus:prometheus-metrics-instrumentation-jvm:1.2.1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ data class Range<T : Comparable<T>?>(
*/
fun clamp(value: T): T = if (value!! >= maxValue) {
maxValue
} else if (value <= maxValue) {
} else if (value <= minValue) {
minValue
} else {
value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ import net.minestom.server.timer.TaskSchedule
fun SchedulerManager.scheduleTask(
delay: TaskSchedule,
repeat: TaskSchedule,
executionType: ExecutionType = ExecutionType.TICK_START,
executionType: ExecutionType = ExecutionType.SYNC,
task: () -> Unit,
) = this.scheduleTask(task, delay, repeat, executionType)
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class DebugLagCommandTest {
any(),
eq(TaskSchedule.tick(1)),
eq(TaskSchedule.tick(1)),
eq(ExecutionType.TICK_START),
eq(ExecutionType.SYNC),
)
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.daylifecraft.minigames.fakeplayer;

import com.extollit.gaming.ai.path.HydrazinePathFinder;
import net.minestom.server.MinecraftServer;
import net.minestom.server.coordinate.Pos;
import net.minestom.server.entity.Player;
Expand Down Expand Up @@ -123,13 +122,6 @@ public void update(long time) {
this.navigator.tick();
}

@Override
public CompletableFuture<Void> setInstance(@NotNull Instance instance, @NotNull Pos spawnPosition) {
this.navigator.setPathFinder(new HydrazinePathFinder(navigator.getPathingEntity(), instance.getInstanceSpace()));

return super.setInstance(instance, spawnPosition);
}

@Override
public void updateNewViewer(@NotNull Player player) {
player.sendPacket(getAddPlayerToList());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ void testConfigsLoadedSuccessful() {
@Order(2)
void testSettingsLoaded() {
Assertions.assertTrue(
Init.getMiniGamesSettingsManager().getGeneralGameSettings("testMiniGame") != null
&& Init.getMiniGamesSettingsManager().getGeneralGameSettings("testMiniGame2") != null,
Init.getMiniGamesSettingsManager().getGeneralGameSettings("testMiniGame") != null,
"Configs was not loaded");
}

Expand All @@ -55,24 +54,4 @@ void testInternalSettingsValues() {
settings,
"TestMiniGame1 settings loaded not correct");
}

@Test
@Order(4)
void testInternalSettingsValues2() {
final var settings = Init.getMiniGamesSettingsManager().getGeneralGameSettings("testMiniGame2");

Assertions.assertEquals(
new GeneralGameSettings(
"testMiniGame2",
"games.testMiniGame2.displayName",
"games.testMiniGame2.description",
Material.RED_SAND,
false,
"test.permission",
new Range<>(1, 8),
new Range<>(2, 6),
EMPTY_CONFIG_SECTION),
settings,
"TestMiniGame2 settings loaded not correct");
}
}

This file was deleted.

Loading

0 comments on commit 23488a4

Please sign in to comment.