forked from SteamWar/SteamWar
Turn the touches back into reward designs styled like any other
The Touch setting is gone. Its unique mechanics become reward designs that use the entry's particle: Burst (on jumping, landing or sneaking, as a puff or a ring), Footprints, Team link, Shimmer and Heartbeat. Each is unlocked by any of the rewards that had it, and Burst's triggers are locked separately. The wing beat becomes the Beat on jump wing motion, unlocked by WarGear Season 2022. December snow and the glyphs are dropped: the first is a plain particle with a condition, the second only works with enchanting glyphs.
This commit is contained in:
@@ -34,18 +34,19 @@ import java.util.WeakHashMap;
|
||||
// A line of particles between nearby players who show the same reward. Each pair is drawn by only one of them.
|
||||
public class TeamLink extends DelegatingParticleElement {
|
||||
|
||||
private static final double RANGE = 8;
|
||||
private static final double SPACING = 0.5;
|
||||
public static final double RANGE = 8;
|
||||
private static final double CHEST = 1.2;
|
||||
|
||||
// Per reward, who showed it in which tick
|
||||
private static final Map<String, Map<Player, Long>> SHOWING = new HashMap<>();
|
||||
|
||||
private final String reward;
|
||||
private final double spacing;
|
||||
|
||||
public TeamLink(String reward, ParticleElement particleElement) {
|
||||
public TeamLink(String reward, ParticleElement particleElement, double spacing) {
|
||||
super(particleElement);
|
||||
this.reward = reward;
|
||||
this.spacing = spacing;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -64,7 +65,7 @@ public class TeamLink extends DelegatingParticleElement {
|
||||
if (to.getWorld() != from.getWorld() || to.distanceSquared(from) > RANGE * RANGE) continue;
|
||||
|
||||
Vector step = to.toVector().subtract(from.toVector());
|
||||
int points = (int) Math.ceil(step.length() / SPACING);
|
||||
int points = (int) Math.ceil(step.length() / spacing);
|
||||
step.multiply(1.0 / points);
|
||||
for (int i = 1; i < points; i++) {
|
||||
particleElement.tick(particleTickData.withLocation(from.clone().add(step.clone().multiply(i))));
|
||||
|
||||
Reference in New Issue
Block a user