Skip to content

Commit 17a83b8

Browse files
#693 Fix travel bar/time syncing for new materialisation sequence
1 parent fd79ac6 commit 17a83b8

File tree

2 files changed

+6
-27
lines changed

2 files changed

+6
-27
lines changed

src/main/java/me/eccentric_nz/TARDIS/flight/TARDISMaterialseFromVortex.java

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
import org.bukkit.scheduler.BukkitScheduler;
4343

4444
import java.util.HashMap;
45+
import java.util.Locale;
4546
import java.util.UUID;
4647

4748
/**
@@ -161,32 +162,11 @@ public void run() {
161162
bd.setTardisID(id);
162163
bd.setThrottle(spaceTimeThrottle);
163164
bd.setParticles(throticle.getParticles());
165+
// get sound effects
166+
String landSFX = (spaceTimeThrottle != SpaceTimeThrottle.NORMAL) ? "tardis_land_" + spaceTimeThrottle.toString().toLowerCase(Locale.ROOT) : "tardis_land";
164167
// determine delay values
165-
long flight_mode_delay;
166-
long travel_time;
167-
String landSFX;
168-
switch (spaceTimeThrottle) {
169-
case WARP -> {
170-
flight_mode_delay = ((plugin.getTrackerKeeper().getDestinationVortex().containsKey(id)) ? 0L : 130L);
171-
travel_time = (malfunction) ? 400L : 94L;
172-
landSFX = "tardis_land_warp";
173-
}
174-
case RAPID -> {
175-
flight_mode_delay = ((plugin.getTrackerKeeper().getDestinationVortex().containsKey(id)) ? 0L : 259L);
176-
travel_time = (malfunction) ? 400L : 188L;
177-
landSFX = "tardis_land_rapid";
178-
}
179-
case FASTER -> {
180-
flight_mode_delay = ((plugin.getTrackerKeeper().getDestinationVortex().containsKey(id)) ? 0L : 388L);
181-
travel_time = (malfunction) ? 400L : 282L;
182-
landSFX = "tardis_land_faster";
183-
}
184-
default -> { // NORMAL
185-
flight_mode_delay = ((plugin.getTrackerKeeper().getDestinationVortex().containsKey(id)) ? 0L : 518L);
186-
travel_time = (malfunction) ? 400L : 375L;
187-
landSFX = "tardis_land";
188-
}
189-
}
168+
long travel_time = (malfunction) ? 400L : (long) (spaceTimeThrottle.getFlightTime() * 0.75d) + 4L;
169+
long flight_mode_delay = ((plugin.getTrackerKeeper().getDestinationVortex().containsKey(id)) ? 0L : spaceTimeThrottle.getFlightTime());
190170
// remember flight data
191171
plugin.getTrackerKeeper().getFlightData().put(uuid, bd);
192172
long materialisation_delay = flight_mode_delay;

todo.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
6. Modelled controls [#836](https://github.com/eccentricdevotion/TARDIS/issues/836)
1111
7. Exterior button door control [#839](https://github.com/eccentricdevotion/TARDIS/issues/839)
1212
8. Console lamp [#837](https://github.com/eccentricdevotion/TARDIS/issues/837)
13-
9. Artron Capacitor Storage placed next to an Artron Furnace will power it with TARDIS energy
14-
10. ?
13+
9. ?
1514

1615
## Next version `5.8.0`
1716

0 commit comments

Comments
 (0)