mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
buildup time adjustments
This commit is contained in:
parent
3343ddf4cc
commit
09f7087ac6
BIN
assets/voxygen/voxel/object/portal.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/object/portal.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/object/portal_active.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/object/portal_active.vox
(Stored with Git LFS)
Binary file not shown.
@ -120,7 +120,7 @@ impl<'a> System<'a> for Sys {
|
|||||||
end_time: Time(time.0 + teleporter.buildup_time.0),
|
end_time: Time(time.0 + teleporter.buildup_time.0),
|
||||||
}));
|
}));
|
||||||
} else if let Some(remaining) = teleporting.and_then(|teleporting| {
|
} else if let Some(remaining) = teleporting.and_then(|teleporting| {
|
||||||
((time.0 - teleporting.teleport_start.0) >= teleporter.buildup_time.0 / 2.
|
((time.0 - teleporting.teleport_start.0) >= teleporter.buildup_time.0 / 3.
|
||||||
&& !matches!(*character_state, CharacterState::Blink(_)))
|
&& !matches!(*character_state, CharacterState::Blink(_)))
|
||||||
.then_some(teleporter.buildup_time.0 - (time.0 - teleporting.teleport_start.0))
|
.then_some(teleporter.buildup_time.0 - (time.0 - teleporting.teleport_start.0))
|
||||||
}) {
|
}) {
|
||||||
@ -181,6 +181,11 @@ impl<'a> System<'a> for Sys {
|
|||||||
|
|
||||||
for entity in cancel_teleport {
|
for entity in cancel_teleport {
|
||||||
teleporting.remove(entity);
|
teleporting.remove(entity);
|
||||||
|
character_states.get_mut(entity).map(|mut state| {
|
||||||
|
if let CharacterState::Blink(data) = &mut *state {
|
||||||
|
data.stage_section = StageSection::Recover;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
for (entity, teleporter) in attempt_teleport {
|
for (entity, teleporter) in attempt_teleport {
|
||||||
|
@ -667,16 +667,16 @@ impl Floor {
|
|||||||
// Move both a bit to the side to prevent teleportation loop, ideally we'd have the portals at another location
|
// Move both a bit to the side to prevent teleportation loop, ideally we'd have the portals at another location
|
||||||
supplement.add_entity(EntityInfo::at(top_pos).into_special(
|
supplement.add_entity(EntityInfo::at(top_pos).into_special(
|
||||||
SpecialEntity::Teleporter(Teleporter {
|
SpecialEntity::Teleporter(Teleporter {
|
||||||
target: bottom_pos+ Vec3::unit_x() * 5.,
|
target: bottom_pos + Vec3::unit_x() * 5.,
|
||||||
requires_no_aggro: false,
|
requires_no_aggro: false,
|
||||||
buildup_time: Secs(1.),
|
buildup_time: Secs(1.),
|
||||||
}),
|
}),
|
||||||
));
|
));
|
||||||
supplement.add_entity(EntityInfo::at(bottom_pos).into_special(
|
supplement.add_entity(EntityInfo::at(bottom_pos).into_special(
|
||||||
SpecialEntity::Teleporter(Teleporter {
|
SpecialEntity::Teleporter(Teleporter {
|
||||||
target: top_pos+ Vec3::unit_x() * 5.,
|
target: top_pos + Vec3::unit_x() * 5.,
|
||||||
requires_no_aggro: true,
|
requires_no_aggro: true,
|
||||||
buildup_time: Secs(3.),
|
buildup_time: Secs(5.),
|
||||||
}),
|
}),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@ -1188,13 +1188,9 @@ impl Floor {
|
|||||||
|
|
||||||
let mut chests = None;
|
let mut chests = None;
|
||||||
|
|
||||||
'room: {
|
|
||||||
if let Some(room) = room.map(|i| self.rooms.get(*i)) {
|
if let Some(room) = room.map(|i| self.rooms.get(*i)) {
|
||||||
height = height.min(room.height);
|
height = height.min(room.height);
|
||||||
if let Tile::UpStair(_, kind) = tile {
|
if let Tile::UpStair(_, kind) = tile && !self.final_level {
|
||||||
if self.final_level {
|
|
||||||
break 'room;
|
|
||||||
}
|
|
||||||
// Construct the staircase that connects this tile to the matching DownStair
|
// Construct the staircase that connects this tile to the matching DownStair
|
||||||
// tile on the floor above (or to the surface if this is the top floor), and
|
// tile on the floor above (or to the surface if this is the top floor), and
|
||||||
// a hollow bounding box to place air in
|
// a hollow bounding box to place air in
|
||||||
@ -1240,6 +1236,7 @@ impl Floor {
|
|||||||
stair_walls.push(outer_bb);
|
stair_walls.push(outer_bb);
|
||||||
stairs.push((stair, lights));
|
stairs.push((stair, lights));
|
||||||
}
|
}
|
||||||
|
|
||||||
if matches!(tile, Tile::Room(_) | Tile::DownStair(_)) {
|
if matches!(tile, Tile::Room(_) | Tile::DownStair(_)) {
|
||||||
let seed = room.seed;
|
let seed = room.seed;
|
||||||
let loot_density = room.loot_density;
|
let loot_density = room.loot_density;
|
||||||
@ -1249,9 +1246,7 @@ impl Floor {
|
|||||||
// filled based on the room's difficulty
|
// filled based on the room's difficulty
|
||||||
let chest_sprite = painter.prim(Primitive::sampling(
|
let chest_sprite = painter.prim(Primitive::sampling(
|
||||||
sprite_layer,
|
sprite_layer,
|
||||||
Box::new(move |pos| {
|
Box::new(move |pos| RandomField::new(seed).chance(pos, loot_density * 0.5)),
|
||||||
RandomField::new(seed).chance(pos, loot_density * 0.5)
|
|
||||||
}),
|
|
||||||
));
|
));
|
||||||
let chest_sprite_fill = Fill::Block(Block::air(match difficulty {
|
let chest_sprite_fill = Fill::Block(Block::air(match difficulty {
|
||||||
2 => SpriteKind::DungeonChest2,
|
2 => SpriteKind::DungeonChest2,
|
||||||
@ -1269,8 +1264,7 @@ impl Floor {
|
|||||||
tile_aabr,
|
tile_aabr,
|
||||||
floor_z - 7..floor_z,
|
floor_z - 7..floor_z,
|
||||||
)));
|
)));
|
||||||
let tile_pit =
|
let tile_pit = painter.prim(Primitive::without(tile_pit, wall_contours));
|
||||||
painter.prim(Primitive::without(tile_pit, wall_contours));
|
|
||||||
painter.fill(tile_pit, Fill::Block(vacant));
|
painter.fill(tile_pit, Fill::Block(vacant));
|
||||||
|
|
||||||
// Fill with lava
|
// Fill with lava
|
||||||
@ -1278,8 +1272,7 @@ impl Floor {
|
|||||||
tile_aabr,
|
tile_aabr,
|
||||||
floor_z - 7..floor_z - 5,
|
floor_z - 7..floor_z - 5,
|
||||||
)));
|
)));
|
||||||
let tile_lava =
|
let tile_lava = painter.prim(Primitive::without(tile_lava, wall_contours));
|
||||||
painter.prim(Primitive::without(tile_lava, wall_contours));
|
|
||||||
//pits.push(tile_pit);
|
//pits.push(tile_pit);
|
||||||
//pits.push(tile_lava);
|
//pits.push(tile_lava);
|
||||||
painter.fill(tile_lava, Fill::Block(lava));
|
painter.fill(tile_lava, Fill::Block(lava));
|
||||||
@ -1294,8 +1287,7 @@ impl Floor {
|
|||||||
let platform = painter.prim(Primitive::Aabb(Aabb {
|
let platform = painter.prim(Primitive::Aabb(Aabb {
|
||||||
min: (tile_center - Vec2::broadcast(pillar_thickness - 1))
|
min: (tile_center - Vec2::broadcast(pillar_thickness - 1))
|
||||||
.with_z(floor_z - 7),
|
.with_z(floor_z - 7),
|
||||||
max: (tile_center + Vec2::broadcast(pillar_thickness))
|
max: (tile_center + Vec2::broadcast(pillar_thickness)).with_z(floor_z),
|
||||||
.with_z(floor_z),
|
|
||||||
}));
|
}));
|
||||||
painter.fill(platform, Fill::Block(stone));
|
painter.fill(platform, Fill::Block(stone));
|
||||||
}
|
}
|
||||||
@ -1339,8 +1331,7 @@ impl Floor {
|
|||||||
// Only add the base (and shift the lights up)
|
// Only add the base (and shift the lights up)
|
||||||
// for boss-rooms pillars
|
// for boss-rooms pillars
|
||||||
if room.kind == RoomKind::Boss {
|
if room.kind == RoomKind::Boss {
|
||||||
lights =
|
lights = painter.prim(Primitive::translate(lights, 3 * Vec3::unit_z()));
|
||||||
painter.prim(Primitive::translate(lights, 3 * Vec3::unit_z()));
|
|
||||||
pillar = painter.prim(Primitive::union(pillar, base));
|
pillar = painter.prim(Primitive::union(pillar, base));
|
||||||
}
|
}
|
||||||
// Specifically don't include pillars in Minotaur arena
|
// Specifically don't include pillars in Minotaur arena
|
||||||
@ -1356,7 +1347,6 @@ impl Floor {
|
|||||||
Some(floor_corner + TILE_SIZE * room.area.center() + TILE_SIZE / 2);
|
Some(floor_corner + TILE_SIZE * room.area.center() + TILE_SIZE / 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Carve out the room's air inside the walls
|
// Carve out the room's air inside the walls
|
||||||
let tile_air = painter.prim(Primitive::Aabb(aabr_with_z(
|
let tile_air = painter.prim(Primitive::Aabb(aabr_with_z(
|
||||||
|
Loading…
Reference in New Issue
Block a user