Skip to content

Commit

Permalink
#693 Fix travel bar/time syncing for new materialisation sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
eccentricdevotion committed Jul 9, 2024
1 parent fd79ac6 commit 17a83b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import org.bukkit.scheduler.BukkitScheduler;

import java.util.HashMap;
import java.util.Locale;
import java.util.UUID;

/**
Expand Down Expand Up @@ -161,32 +162,11 @@ public void run() {
bd.setTardisID(id);
bd.setThrottle(spaceTimeThrottle);
bd.setParticles(throticle.getParticles());
// get sound effects
String landSFX = (spaceTimeThrottle != SpaceTimeThrottle.NORMAL) ? "tardis_land_" + spaceTimeThrottle.toString().toLowerCase(Locale.ROOT) : "tardis_land";
// determine delay values
long flight_mode_delay;
long travel_time;
String landSFX;
switch (spaceTimeThrottle) {
case WARP -> {
flight_mode_delay = ((plugin.getTrackerKeeper().getDestinationVortex().containsKey(id)) ? 0L : 130L);
travel_time = (malfunction) ? 400L : 94L;
landSFX = "tardis_land_warp";
}
case RAPID -> {
flight_mode_delay = ((plugin.getTrackerKeeper().getDestinationVortex().containsKey(id)) ? 0L : 259L);
travel_time = (malfunction) ? 400L : 188L;
landSFX = "tardis_land_rapid";
}
case FASTER -> {
flight_mode_delay = ((plugin.getTrackerKeeper().getDestinationVortex().containsKey(id)) ? 0L : 388L);
travel_time = (malfunction) ? 400L : 282L;
landSFX = "tardis_land_faster";
}
default -> { // NORMAL
flight_mode_delay = ((plugin.getTrackerKeeper().getDestinationVortex().containsKey(id)) ? 0L : 518L);
travel_time = (malfunction) ? 400L : 375L;
landSFX = "tardis_land";
}
}
long travel_time = (malfunction) ? 400L : (long) (spaceTimeThrottle.getFlightTime() * 0.75d) + 4L;
long flight_mode_delay = ((plugin.getTrackerKeeper().getDestinationVortex().containsKey(id)) ? 0L : spaceTimeThrottle.getFlightTime());
// remember flight data
plugin.getTrackerKeeper().getFlightData().put(uuid, bd);
long materialisation_delay = flight_mode_delay;
Expand Down
3 changes: 1 addition & 2 deletions todo.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
6. Modelled controls [#836](https://github.com/eccentricdevotion/TARDIS/issues/836)
7. Exterior button door control [#839](https://github.com/eccentricdevotion/TARDIS/issues/839)
8. Console lamp [#837](https://github.com/eccentricdevotion/TARDIS/issues/837)
9. Artron Capacitor Storage placed next to an Artron Furnace will power it with TARDIS energy
10. ?
9. ?

## Next version `5.8.0`

Expand Down

0 comments on commit 17a83b8

Please sign in to comment.