mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Makes dungeons start at level 1 visually
This commit is contained in:
parent
2bc4f364bf
commit
dddb47a385
@ -50,6 +50,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Usage of "stamina" replaced with "energy"
|
- Usage of "stamina" replaced with "energy"
|
||||||
- Glider dimensions now depend on character height
|
- Glider dimensions now depend on character height
|
||||||
- Glider dimensions somewhat increased overall
|
- Glider dimensions somewhat increased overall
|
||||||
|
- Dungeon difficulty level starts at 1 instead of 0
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
BIN
assets/voxygen/element/ui/map/buttons/dungeon_hover.png
(Stored with Git LFS)
BIN
assets/voxygen/element/ui/map/buttons/dungeon_hover.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/ui/map/icons/dif_3.png
(Stored with Git LFS)
BIN
assets/voxygen/element/ui/map/icons/dif_3.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/ui/map/icons/dif_4.png
(Stored with Git LFS)
BIN
assets/voxygen/element/ui/map/icons/dif_4.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/ui/map/icons/dif_5.png
(Stored with Git LFS)
BIN
assets/voxygen/element/ui/map/icons/dif_5.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/ui/map/icons/dif_unknown.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/ui/map/icons/dif_unknown.png
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -384,6 +384,7 @@ image_ids! {
|
|||||||
map_dif_4: "voxygen.element.ui.map.icons.dif_4",
|
map_dif_4: "voxygen.element.ui.map.icons.dif_4",
|
||||||
map_dif_5: "voxygen.element.ui.map.icons.dif_5",
|
map_dif_5: "voxygen.element.ui.map.icons.dif_5",
|
||||||
map_dif_6: "voxygen.element.ui.map.icons.dif_6",
|
map_dif_6: "voxygen.element.ui.map.icons.dif_6",
|
||||||
|
map_dif_unknown: "voxygen.element.ui.map.icons.dif_unknown",
|
||||||
mmap_site_town: "voxygen.element.ui.map.buttons.town",
|
mmap_site_town: "voxygen.element.ui.map.buttons.town",
|
||||||
mmap_site_town_hover: "voxygen.element.ui.map.buttons.town_hover",
|
mmap_site_town_hover: "voxygen.element.ui.map.buttons.town_hover",
|
||||||
mmap_site_town_bg: "voxygen.element.ui.map.buttons.town_bg",
|
mmap_site_town_bg: "voxygen.element.ui.map.buttons.town_bg",
|
||||||
|
@ -787,15 +787,15 @@ impl<'a> Widget for Map<'a> {
|
|||||||
SiteKind::Tree => i18n.get("hud.map.tree"),
|
SiteKind::Tree => i18n.get("hud.map.tree"),
|
||||||
});
|
});
|
||||||
let (difficulty, desc) = match &site.kind {
|
let (difficulty, desc) = match &site.kind {
|
||||||
SiteKind::Town => (0, i18n.get("hud.map.town").to_string()),
|
SiteKind::Town => (None, i18n.get("hud.map.town").to_string()),
|
||||||
SiteKind::Dungeon { difficulty } => (
|
SiteKind::Dungeon { difficulty } => (
|
||||||
*difficulty,
|
Some(*difficulty),
|
||||||
i18n.get("hud.map.difficulty_dungeon")
|
i18n.get("hud.map.difficulty_dungeon")
|
||||||
.replace("{difficulty}", difficulty.to_string().as_str()),
|
.replace("{difficulty}", (difficulty + 1).to_string().as_str()),
|
||||||
),
|
),
|
||||||
SiteKind::Castle => (0, i18n.get("hud.map.castle").to_string()),
|
SiteKind::Castle => (None, i18n.get("hud.map.castle").to_string()),
|
||||||
SiteKind::Cave => (0, i18n.get("hud.map.cave").to_string()),
|
SiteKind::Cave => (None, i18n.get("hud.map.cave").to_string()),
|
||||||
SiteKind::Tree => (0, i18n.get("hud.map.tree").to_string()),
|
SiteKind::Tree => (None, i18n.get("hud.map.tree").to_string()),
|
||||||
};
|
};
|
||||||
let desc = desc + &get_site_economy(site_rich);
|
let desc = desc + &get_site_economy(site_rich);
|
||||||
let site_btn = Button::image(match &site.kind {
|
let site_btn = Button::image(match &site.kind {
|
||||||
@ -828,12 +828,12 @@ impl<'a> Widget for Map<'a> {
|
|||||||
SiteKind::Town => TEXT_COLOR,
|
SiteKind::Town => TEXT_COLOR,
|
||||||
SiteKind::Castle => TEXT_COLOR,
|
SiteKind::Castle => TEXT_COLOR,
|
||||||
SiteKind::Dungeon { .. } => match difficulty {
|
SiteKind::Dungeon { .. } => match difficulty {
|
||||||
0 => QUALITY_LOW,
|
Some(0) => QUALITY_LOW,
|
||||||
1 => QUALITY_COMMON,
|
Some(1) => QUALITY_COMMON,
|
||||||
2 => QUALITY_MODERATE,
|
Some(2) => QUALITY_MODERATE,
|
||||||
3 => QUALITY_HIGH,
|
Some(3) => QUALITY_HIGH,
|
||||||
4 => QUALITY_EPIC,
|
Some(4) => QUALITY_EPIC,
|
||||||
5 => QUALITY_DEBUG,
|
Some(5) => QUALITY_DEBUG,
|
||||||
_ => TEXT_COLOR,
|
_ => TEXT_COLOR,
|
||||||
},
|
},
|
||||||
SiteKind::Cave => TEXT_COLOR,
|
SiteKind::Cave => TEXT_COLOR,
|
||||||
@ -859,34 +859,40 @@ impl<'a> Widget for Map<'a> {
|
|||||||
// Difficulty from 0-6
|
// Difficulty from 0-6
|
||||||
// 0 = towns and places without a difficulty level
|
// 0 = towns and places without a difficulty level
|
||||||
if show_difficulty {
|
if show_difficulty {
|
||||||
let size = 1.8; // Size factor for difficulty indicators
|
let rsize = zoom * 1.8; // Size factor for difficulty indicators
|
||||||
let dif_img = Image::new(match difficulty {
|
let dif_img = Image::new(match difficulty {
|
||||||
1 => self.imgs.map_dif_1,
|
Some(0) => self.imgs.map_dif_1,
|
||||||
2 => self.imgs.map_dif_2,
|
Some(1) => self.imgs.map_dif_2,
|
||||||
3 => self.imgs.map_dif_3,
|
Some(2) => self.imgs.map_dif_3,
|
||||||
4 => self.imgs.map_dif_4,
|
Some(3) => self.imgs.map_dif_4,
|
||||||
5 => self.imgs.map_dif_6,
|
Some(4) => self.imgs.map_dif_5,
|
||||||
_ => self.imgs.nothing,
|
Some(5) => self.imgs.map_dif_6,
|
||||||
|
Some(_) => self.imgs.map_dif_unknown,
|
||||||
|
None => self.imgs.nothing,
|
||||||
})
|
})
|
||||||
.mid_top_with_margin_on(state.ids.mmap_site_icons[i], match difficulty {
|
.mid_top_with_margin_on(state.ids.mmap_site_icons[i], match difficulty {
|
||||||
5 => -2.0 * zoom * size,
|
Some(0 | 1) => -1.0 * rsize,
|
||||||
_ => -1.0 * zoom * size,
|
Some(_) => -2.0 * rsize,
|
||||||
|
_ => -1.0 * rsize,
|
||||||
})
|
})
|
||||||
.w(match difficulty {
|
.w(match difficulty {
|
||||||
5 => 2.0 * zoom * size,
|
Some(0) => 1.0 * rsize,
|
||||||
_ => 1.0 * zoom * size * difficulty as f64,
|
Some(1 | 2 | 5) => 2.0 * rsize,
|
||||||
|
Some(_) => 3.0 * rsize,
|
||||||
|
_ => 1.0 * rsize,
|
||||||
})
|
})
|
||||||
.h(match difficulty {
|
.h(match difficulty {
|
||||||
5 => 2.0 * size * zoom,
|
Some(0 | 1) => 1.0 * rsize,
|
||||||
_ => 1.0 * zoom * size,
|
Some(_) => 2.0 * rsize,
|
||||||
|
_ => 1.0 * rsize,
|
||||||
})
|
})
|
||||||
.color(Some(match difficulty {
|
.color(Some(match difficulty {
|
||||||
0 => QUALITY_LOW,
|
Some(0) => QUALITY_LOW,
|
||||||
1 => QUALITY_COMMON,
|
Some(1) => QUALITY_COMMON,
|
||||||
2 => QUALITY_MODERATE,
|
Some(2) => QUALITY_MODERATE,
|
||||||
3 => QUALITY_HIGH,
|
Some(3) => QUALITY_HIGH,
|
||||||
4 => QUALITY_EPIC,
|
Some(4) => QUALITY_EPIC,
|
||||||
5 => QUALITY_DEBUG,
|
Some(5) => QUALITY_DEBUG,
|
||||||
_ => TEXT_COLOR,
|
_ => TEXT_COLOR,
|
||||||
}));
|
}));
|
||||||
match &site.kind {
|
match &site.kind {
|
||||||
|
@ -688,6 +688,13 @@ impl<'a> Widget for MiniMap<'a> {
|
|||||||
Some(rpos) => rpos,
|
Some(rpos) => rpos,
|
||||||
None => continue,
|
None => continue,
|
||||||
};
|
};
|
||||||
|
let difficulty = match &site.kind {
|
||||||
|
SiteKind::Town => None,
|
||||||
|
SiteKind::Dungeon { difficulty } => Some(*difficulty),
|
||||||
|
SiteKind::Castle => None,
|
||||||
|
SiteKind::Cave => None,
|
||||||
|
SiteKind::Tree => None,
|
||||||
|
};
|
||||||
|
|
||||||
Image::new(match &site.kind {
|
Image::new(match &site.kind {
|
||||||
SiteKind::Town => self.imgs.mmap_site_town_bg,
|
SiteKind::Town => self.imgs.mmap_site_town_bg,
|
||||||
@ -702,20 +709,14 @@ impl<'a> Widget for MiniMap<'a> {
|
|||||||
position::Relative::Scalar(rpos.y as f64),
|
position::Relative::Scalar(rpos.y as f64),
|
||||||
)
|
)
|
||||||
.w_h(20.0, 20.0)
|
.w_h(20.0, 20.0)
|
||||||
.color(Some(match &site.kind {
|
.color(Some(match difficulty {
|
||||||
SiteKind::Town => Color::Rgba(1.0, 1.0, 1.0, 0.0),
|
Some(0) => QUALITY_LOW,
|
||||||
SiteKind::Castle => Color::Rgba(1.0, 1.0, 1.0, 0.0),
|
Some(1) => QUALITY_COMMON,
|
||||||
SiteKind::Dungeon { difficulty } => match difficulty {
|
Some(2) => QUALITY_MODERATE,
|
||||||
0 => QUALITY_LOW,
|
Some(3) => QUALITY_HIGH,
|
||||||
1 => QUALITY_COMMON,
|
Some(4) => QUALITY_EPIC,
|
||||||
2 => QUALITY_MODERATE,
|
Some(5) => QUALITY_DEBUG,
|
||||||
3 => QUALITY_HIGH,
|
_ => Color::Rgba(1.0, 1.0, 1.0, 0.0),
|
||||||
4 => QUALITY_EPIC,
|
|
||||||
5 => QUALITY_DEBUG,
|
|
||||||
_ => Color::Rgba(1.0, 1.0, 1.0, 0.0),
|
|
||||||
},
|
|
||||||
SiteKind::Cave => Color::Rgba(1.0, 1.0, 1.0, 0.0),
|
|
||||||
SiteKind::Tree => Color::Rgba(1.0, 1.0, 1.0, 0.0),
|
|
||||||
}))
|
}))
|
||||||
.set(state.ids.mmap_site_icons_bgs[i], ui);
|
.set(state.ids.mmap_site_icons_bgs[i], ui);
|
||||||
Image::new(match &site.kind {
|
Image::new(match &site.kind {
|
||||||
|
Loading…
Reference in New Issue
Block a user