mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
More item drops
This commit is contained in:
parent
8f8bb8d32f
commit
b34da9b07b
@ -7,5 +7,6 @@ Item(
|
|||||||
amount: 20,
|
amount: 20,
|
||||||
cause: Item,
|
cause: Item,
|
||||||
)),
|
)),
|
||||||
|
amount: 20,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
8
assets/common/items/boss_drops/exp_flask.ron
Normal file
8
assets/common/items/boss_drops/exp_flask.ron
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
Item(
|
||||||
|
name: "Flask of Velorite Dusk",
|
||||||
|
description: "Increases Exp by 250\n\nTake with plenty of water\n\n<Right-Click to use>",
|
||||||
|
kind: Consumable(
|
||||||
|
kind: PotionExp,
|
||||||
|
effect: Xp(250),
|
||||||
|
),
|
||||||
|
)
|
@ -7,6 +7,6 @@ Item(
|
|||||||
amount: 100,
|
amount: 100,
|
||||||
cause: Item,
|
cause: Item,
|
||||||
)),
|
)),
|
||||||
amount: 15,
|
amount: 10,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -7,5 +7,6 @@ Item(
|
|||||||
amount: 15,
|
amount: 15,
|
||||||
cause: Item,
|
cause: Item,
|
||||||
)),
|
)),
|
||||||
|
amount: 20,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -7,5 +7,6 @@ Item(
|
|||||||
amount: 30,
|
amount: 30,
|
||||||
cause: Item,
|
cause: Item,
|
||||||
)),
|
)),
|
||||||
|
amount: 20,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -4,4 +4,5 @@ Item(
|
|||||||
kind: Utility(
|
kind: Utility(
|
||||||
kind: Collar,
|
kind: Collar,
|
||||||
),
|
),
|
||||||
|
amount: 1,
|
||||||
)
|
)
|
||||||
|
@ -7,5 +7,6 @@ Item(
|
|||||||
amount: 10,
|
amount: 10,
|
||||||
cause: Item,
|
cause: Item,
|
||||||
)),
|
)),
|
||||||
|
amount: 40,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
12
assets/common/items/potion_big.ron
Normal file
12
assets/common/items/potion_big.ron
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
Item(
|
||||||
|
name: "Large Potion",
|
||||||
|
description: "Restores 100 Health\n\n<Right-Click to use>",
|
||||||
|
kind: Consumable(
|
||||||
|
kind: PotionMinor,
|
||||||
|
effect: Health((
|
||||||
|
amount: 100,
|
||||||
|
cause: Item,
|
||||||
|
)),
|
||||||
|
amount: 10,
|
||||||
|
),
|
||||||
|
)
|
12
assets/common/items/potion_med.ron
Normal file
12
assets/common/items/potion_med.ron
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
Item(
|
||||||
|
name: "Medium Potion",
|
||||||
|
description: "Restores 70 Health\n\n<Right-Click to use>",
|
||||||
|
kind: Consumable(
|
||||||
|
kind: PotionMinor,
|
||||||
|
effect: Health((
|
||||||
|
amount: 70,
|
||||||
|
cause: Item,
|
||||||
|
)),
|
||||||
|
amount: 10,
|
||||||
|
),
|
||||||
|
)
|
@ -7,5 +7,6 @@ Item(
|
|||||||
amount: 50,
|
amount: 50,
|
||||||
cause: Item,
|
cause: Item,
|
||||||
)),
|
)),
|
||||||
|
amount: 10,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -5,4 +5,5 @@ Item(
|
|||||||
kind: Velorite,
|
kind: Velorite,
|
||||||
effect: Xp(20),
|
effect: Xp(20),
|
||||||
),
|
),
|
||||||
|
amount: 10,
|
||||||
)
|
)
|
||||||
|
@ -5,4 +5,5 @@ Item(
|
|||||||
kind: VeloriteFrag,
|
kind: VeloriteFrag,
|
||||||
effect: Xp(10),
|
effect: Xp(10),
|
||||||
),
|
),
|
||||||
|
amount: 20,
|
||||||
)
|
)
|
||||||
|
10
assets/common/items/weapons/sword/cultist_purp_2h-0.ron
Normal file
10
assets/common/items/weapons/sword/cultist_purp_2h-0.ron
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
Item(
|
||||||
|
name: "Magical Cultist Greatsword",
|
||||||
|
description: "Two-Hand Sword\n\nPower: 6-20\n\nThis belonged to an evil Cult Leader\n\n<Right-Click to use>",
|
||||||
|
kind: Tool(
|
||||||
|
(
|
||||||
|
kind: Sword(CultPurp0),
|
||||||
|
equip_time_millis: 500,
|
||||||
|
)
|
||||||
|
),
|
||||||
|
)
|
BIN
assets/voxygen/element/misc_bg/temp_quest_bg.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/misc_bg/temp_quest_bg.png
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -194,6 +194,18 @@ um dieses Fenster zu schließen? Drückt 'TAB'!
|
|||||||
|
|
||||||
Viel Spaß in der Welt von Veloren, Abenteurer!"#,
|
Viel Spaß in der Welt von Veloren, Abenteurer!"#,
|
||||||
|
|
||||||
|
"hud.temp_quest_headline": r#"Please, help us Traveler!"#,
|
||||||
|
"hud.temp_quest_text": r#"Dungeons filled with evil cultists
|
||||||
|
have emerged all around our peaceful towns!
|
||||||
|
|
||||||
|
|
||||||
|
Gather some company, stack up on food
|
||||||
|
and defeat their vile leaders and acolytes.
|
||||||
|
|
||||||
|
|
||||||
|
Maybe you can even obtain one of their
|
||||||
|
magically infused items?"#,
|
||||||
|
|
||||||
// Inventory
|
// Inventory
|
||||||
"hud.bag.inventory": "{playername}s Inventar",
|
"hud.bag.inventory": "{playername}s Inventar",
|
||||||
"hud.bag.stats_title": "{playername}s Werte",
|
"hud.bag.stats_title": "{playername}s Werte",
|
||||||
@ -336,6 +348,7 @@ Viel Spaß in der Welt von Veloren, Abenteurer!"#,
|
|||||||
"gameinput.togglewield": "Waffe ziehen/wegstecken",
|
"gameinput.togglewield": "Waffe ziehen/wegstecken",
|
||||||
"gameinput.interact": "Interagieren",
|
"gameinput.interact": "Interagieren",
|
||||||
"gameinput.freelook": "Freie Sicht",
|
"gameinput.freelook": "Freie Sicht",
|
||||||
|
"gameinput.dance": "Tanzen",
|
||||||
|
|
||||||
/// End GameInput section
|
/// End GameInput section
|
||||||
|
|
||||||
|
@ -190,6 +190,19 @@ Want to free your cursor to close this window? Press TAB!
|
|||||||
|
|
||||||
Enjoy your stay in the World of Veloren."#,
|
Enjoy your stay in the World of Veloren."#,
|
||||||
|
|
||||||
|
"hud.temp_quest_headline": r#"Please, help us Traveler!"#,
|
||||||
|
"hud.temp_quest_text": r#"Dungeons filled with evil cultists
|
||||||
|
have emerged all around our peaceful towns!
|
||||||
|
|
||||||
|
|
||||||
|
Gather some company, stack up on food
|
||||||
|
and defeat their vile leaders and acolytes.
|
||||||
|
|
||||||
|
|
||||||
|
Maybe you can even obtain one of their
|
||||||
|
magically infused items?"#,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Inventory
|
// Inventory
|
||||||
"hud.bag.inventory": "{playername}'s Inventory",
|
"hud.bag.inventory": "{playername}'s Inventory",
|
||||||
|
@ -153,6 +153,18 @@ Vous souhaitez libérer votre souris pour fermer cette fenêtre? Tapez sur TAB!
|
|||||||
|
|
||||||
Profitez de votre séjour dans le monde de Veloren."#,
|
Profitez de votre séjour dans le monde de Veloren."#,
|
||||||
|
|
||||||
|
"hud.temp_quest_headline": r#"Please, help us Traveler!"#,
|
||||||
|
"hud.temp_quest_text": r#"Dungeons filled with evil cultists
|
||||||
|
have emerged all around our peaceful towns!
|
||||||
|
|
||||||
|
|
||||||
|
Gather some company, stack up on food
|
||||||
|
and defeat their vile leaders and acolytes.
|
||||||
|
|
||||||
|
|
||||||
|
Maybe you can even obtain one of their
|
||||||
|
magically infused items?"#,
|
||||||
|
|
||||||
"hud.settings.general": "Général",
|
"hud.settings.general": "Général",
|
||||||
"hud.settings.help_window": "Fenêtre d'aide",
|
"hud.settings.help_window": "Fenêtre d'aide",
|
||||||
"hud.settings.debug_info": "Information de débogage",
|
"hud.settings.debug_info": "Information de débogage",
|
||||||
|
@ -280,8 +280,18 @@ Vuoi sbloccare il cursore per chiudere questa finestra? Premi TAB!
|
|||||||
|
|
||||||
Goditi il tuo soggiorno nel Mondo di Veloren."#,
|
Goditi il tuo soggiorno nel Mondo di Veloren."#,
|
||||||
|
|
||||||
|
"hud.temp_quest_headline": r#"Please, help us Traveler!"#,
|
||||||
|
"hud.temp_quest_text": r#"Dungeons filled with evil cultists
|
||||||
|
have emerged all around our peaceful towns!
|
||||||
|
|
||||||
|
|
||||||
|
Gather some company, stack up on food
|
||||||
|
and defeat their vile leaders and acolytes.
|
||||||
|
|
||||||
|
|
||||||
|
Maybe you can even obtain one of their
|
||||||
|
magically infused items?"#,
|
||||||
|
|
||||||
|
|
||||||
"hud.settings.general": "Generale",
|
"hud.settings.general": "Generale",
|
||||||
"hud.settings.none": "Nessuno",
|
"hud.settings.none": "Nessuno",
|
||||||
|
@ -182,6 +182,18 @@ Quer libertar o mouse para fechar esta janela? Clique em TAB!
|
|||||||
|
|
||||||
Aprecie a sua estadia no mundo de Veloren."#,
|
Aprecie a sua estadia no mundo de Veloren."#,
|
||||||
|
|
||||||
|
"hud.temp_quest_headline": r#"Please, help us Traveler!"#,
|
||||||
|
"hud.temp_quest_text": r#"Dungeons filled with evil cultists
|
||||||
|
have emerged all around our peaceful towns!
|
||||||
|
|
||||||
|
|
||||||
|
Gather some company, stack up on food
|
||||||
|
and defeat their vile leaders and acolytes.
|
||||||
|
|
||||||
|
|
||||||
|
Maybe you can even obtain one of their
|
||||||
|
magically infused items?"#,
|
||||||
|
|
||||||
"hud.settings.general": "Geral",
|
"hud.settings.general": "Geral",
|
||||||
"hud.settings.none": "Nenhum",
|
"hud.settings.none": "Nenhum",
|
||||||
"hud.settings.press_behavior.toggle": "Alternar",
|
"hud.settings.press_behavior.toggle": "Alternar",
|
||||||
|
@ -179,6 +179,18 @@ https://account.veloren.net."#,
|
|||||||
|
|
||||||
Наслаждайтесь миром Veloren."#,
|
Наслаждайтесь миром Veloren."#,
|
||||||
|
|
||||||
|
"hud.temp_quest_headline": r#"Please, help us Traveler!"#,
|
||||||
|
"hud.temp_quest_text": r#"Dungeons filled with evil cultists
|
||||||
|
have emerged all around our peaceful towns!
|
||||||
|
|
||||||
|
|
||||||
|
Gather some company, stack up on food
|
||||||
|
and defeat their vile leaders and acolytes.
|
||||||
|
|
||||||
|
|
||||||
|
Maybe you can even obtain one of their
|
||||||
|
magically infused items?"#,
|
||||||
|
|
||||||
|
|
||||||
// Inventory
|
// Inventory
|
||||||
"hud.bag.inventory": "Инвентарь",
|
"hud.bag.inventory": "Инвентарь",
|
||||||
|
@ -191,6 +191,18 @@ Bu pencereyi kapatmak için imlecini serbest bırakmak mı istiyorsun? TAB'a bas
|
|||||||
|
|
||||||
Veloren'in Dünyasında sana iyi eğlenceler!"#,
|
Veloren'in Dünyasında sana iyi eğlenceler!"#,
|
||||||
|
|
||||||
|
"hud.temp_quest_headline": r#"Please, help us Traveler!"#,
|
||||||
|
"hud.temp_quest_text": r#"Dungeons filled with evil cultists
|
||||||
|
have emerged all around our peaceful towns!
|
||||||
|
|
||||||
|
|
||||||
|
Gather some company, stack up on food
|
||||||
|
and defeat their vile leaders and acolytes.
|
||||||
|
|
||||||
|
|
||||||
|
Maybe you can even obtain one of their
|
||||||
|
magically infused items?"#,
|
||||||
|
|
||||||
|
|
||||||
// Inventory
|
// Inventory
|
||||||
"hud.bag.inventory": "'in Envanteri",
|
"hud.bag.inventory": "'in Envanteri",
|
||||||
|
@ -178,6 +178,10 @@
|
|||||||
"voxel.weapon.sword.long_2h_fine-5",
|
"voxel.weapon.sword.long_2h_fine-5",
|
||||||
(0.0, 0.0, 0.0), (-135.0, 90.0, 0.0), 1.5,
|
(0.0, 0.0, 0.0), (-135.0, 90.0, 0.0), 1.5,
|
||||||
),
|
),
|
||||||
|
Tool(Sword(CultPurp0)): VoxTrans(
|
||||||
|
"voxel.weapon.sword.cultist_purp_2h-0",
|
||||||
|
(0.0, 0.0, 0.0), (-135.0, 90.0, 0.0), 1.5,
|
||||||
|
),
|
||||||
// Axes
|
// Axes
|
||||||
Tool(Axe(BasicAxe)): VoxTrans(
|
Tool(Axe(BasicAxe)): VoxTrans(
|
||||||
"voxel.weapon.axe.rusty_2h",
|
"voxel.weapon.axe.rusty_2h",
|
||||||
@ -617,6 +621,10 @@
|
|||||||
"voxel.object.potion_red",
|
"voxel.object.potion_red",
|
||||||
(0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.8,
|
(0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.8,
|
||||||
),
|
),
|
||||||
|
Consumable(PotionExp): VoxTrans(
|
||||||
|
"voxel.object.potion_turq",
|
||||||
|
(0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.8,
|
||||||
|
),
|
||||||
Consumable(Cheese): VoxTrans(
|
Consumable(Cheese): VoxTrans(
|
||||||
"element.icons.item_cheese",
|
"element.icons.item_cheese",
|
||||||
(0.0, 0.0, 0.0), (-90.0, 90.0, 0.0), 0.9,
|
(0.0, 0.0, 0.0), (-90.0, 90.0, 0.0), 0.9,
|
||||||
|
@ -63,51 +63,51 @@
|
|||||||
),
|
),
|
||||||
Leather0: (
|
Leather0: (
|
||||||
left: (
|
left: (
|
||||||
vox_spec: ("armor.shoulder.leather_right-0", (-3.2, -3.5, 1.0)),
|
vox_spec: ("armor.shoulder.leather_right-0", (-3.2, -3.5, 0.0)),
|
||||||
color: None
|
color: None
|
||||||
),
|
),
|
||||||
right: (
|
right: (
|
||||||
vox_spec: ("armor.shoulder.leather_right-0", (-1.8, -3.5, 1.0)),
|
vox_spec: ("armor.shoulder.leather_right-0", (-1.8, -3.5, 0.0)),
|
||||||
color: None
|
color: None
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
Leather1: (
|
Leather1: (
|
||||||
left: (
|
left: (
|
||||||
vox_spec: ("armor.shoulder.leather_right-1", (-3.6, -4.5, 1.0)),
|
vox_spec: ("armor.shoulder.leather_right-1", (-3.6, -4.5, 0.0)),
|
||||||
color: None
|
color: None
|
||||||
),
|
),
|
||||||
right: (
|
right: (
|
||||||
vox_spec: ("armor.shoulder.leather_right-1", (-2.6, -4.5, 1.0)),
|
vox_spec: ("armor.shoulder.leather_right-1", (-2.6, -4.5, 0.0)),
|
||||||
color: None
|
color: None
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
ClothPurple0: (
|
ClothPurple0: (
|
||||||
left: (
|
left: (
|
||||||
vox_spec: ("armor.shoulder.cloth_purple_right-0", (-3.2, -3.5, 1.0)),
|
vox_spec: ("armor.shoulder.cloth_purple_right-0", (-3.2, -3.5, 0.0)),
|
||||||
color: None
|
color: None
|
||||||
),
|
),
|
||||||
right: (
|
right: (
|
||||||
vox_spec: ("armor.shoulder.cloth_purple_right-0", (-1.8, -3.5, 1.0)),
|
vox_spec: ("armor.shoulder.cloth_purple_right-0", (-1.8, -3.5, 0.0)),
|
||||||
color: None
|
color: None
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
ClothBlue0: (
|
ClothBlue0: (
|
||||||
left: (
|
left: (
|
||||||
vox_spec: ("armor.shoulder.cloth_blue_left-0", (-3.2, -3.5, 1.0)),
|
vox_spec: ("armor.shoulder.cloth_blue_left-0", (-3.2, -3.5, 0.0)),
|
||||||
color: None
|
color: None
|
||||||
),
|
),
|
||||||
right: (
|
right: (
|
||||||
vox_spec: ("armor.shoulder.cloth_blue_right-0", (-1.8, -3.5, 1.0)),
|
vox_spec: ("armor.shoulder.cloth_blue_right-0", (-1.8, -3.5, 0.0)),
|
||||||
color: None
|
color: None
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
ClothGreen0: (
|
ClothGreen0: (
|
||||||
left: (
|
left: (
|
||||||
vox_spec: ("armor.shoulder.cloth_green_left-0", (-3.2, -3.5, 1.0)),
|
vox_spec: ("armor.shoulder.cloth_green_left-0", (-3.2, -3.5, 0.0)),
|
||||||
color: None
|
color: None
|
||||||
),
|
),
|
||||||
right: (
|
right: (
|
||||||
vox_spec: ("armor.shoulder.cloth_green_right-0", (-1.8, -3.5, 1.0)),
|
vox_spec: ("armor.shoulder.cloth_green_right-0", (-1.8, -3.5, 0.0)),
|
||||||
color: None
|
color: None
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
color: None
|
color: None
|
||||||
),
|
),
|
||||||
Sword(GreatswordOrn2): (
|
Sword(GreatswordOrn2): (
|
||||||
vox_spec: ("weapon.sword.greatsword_2h_orn-2", (-1.0, -4.5, -7.5 )),
|
vox_spec: ("weapon.sword.greatsword_2h_orn-2", (-1.0, -4.5, -7.5)),
|
||||||
color: None
|
color: None
|
||||||
),
|
),
|
||||||
Sword(GreatswordFine0): (
|
Sword(GreatswordFine0): (
|
||||||
@ -162,6 +162,10 @@
|
|||||||
Sword(LongFine5): (
|
Sword(LongFine5): (
|
||||||
vox_spec: ("weapon.sword.long_2h_fine-5", (-2.0, -4.5, -6.0)),
|
vox_spec: ("weapon.sword.long_2h_fine-5", (-2.0, -4.5, -6.0)),
|
||||||
color: None
|
color: None
|
||||||
|
),
|
||||||
|
Sword(CultPurp0): (
|
||||||
|
vox_spec: ("weapon.sword.cultist_purp_2h-0", (-2.0, -4.5, -7.5)),
|
||||||
|
color: None
|
||||||
),
|
),
|
||||||
Axe(BasicAxe): (
|
Axe(BasicAxe): (
|
||||||
vox_spec: ("weapon.axe.rusty_2h", (-1.5, -5.0, -4.0)),
|
vox_spec: ("weapon.axe.rusty_2h", (-1.5, -5.0, -4.0)),
|
||||||
|
BIN
assets/voxygen/voxel/object/potion_purp.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/object/potion_purp.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/weapon/sword/cultist_purp_2h-0.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/weapon/sword/cultist_purp_2h-0.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -25,6 +25,7 @@ pub enum Consumable {
|
|||||||
Velorite,
|
Velorite,
|
||||||
VeloriteFrag,
|
VeloriteFrag,
|
||||||
PotionMinor,
|
PotionMinor,
|
||||||
|
PotionExp,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||||
@ -180,53 +181,111 @@ impl Item {
|
|||||||
BlockKind::Coconut => Some(assets::load_expect_cloned("common.items.coconut")),
|
BlockKind::Coconut => Some(assets::load_expect_cloned("common.items.coconut")),
|
||||||
BlockKind::Chest => Some(assets::load_expect_cloned(
|
BlockKind::Chest => Some(assets::load_expect_cloned(
|
||||||
[
|
[
|
||||||
"common.items.apple",
|
//miscellaneous
|
||||||
"common.items.velorite",
|
"common.items.velorite",
|
||||||
"common.items.veloritefrag",
|
"common.items.veloritefrag",
|
||||||
"common.items.cheese",
|
|
||||||
"common.items.potion_minor",
|
"common.items.potion_minor",
|
||||||
"common.items.collar",
|
"common.items.collar",
|
||||||
|
//swords
|
||||||
"common.items.weapons.sword.starter_sword",
|
"common.items.weapons.sword.starter_sword",
|
||||||
"common.items.weapons.axe.starter_axe",
|
|
||||||
"common.items.weapons.staff.staff_nature",
|
|
||||||
"common.items.weapons.hammer.starter_hammer",
|
|
||||||
"common.items.weapons.bow.starter_bow",
|
|
||||||
"common.items.weapons.staff.starter_staff",
|
|
||||||
"common.items.armor.belt.plate_0",
|
|
||||||
"common.items.armor.belt.leather_0",
|
|
||||||
"common.items.armor.chest.plate_green_0",
|
|
||||||
"common.items.armor.chest.leather_0",
|
|
||||||
"common.items.armor.foot.plate_0",
|
|
||||||
"common.items.armor.foot.leather_0",
|
|
||||||
"common.items.armor.pants.plate_green_0",
|
|
||||||
"common.items.armor.belt.leather_0",
|
|
||||||
"common.items.armor.shoulder.plate_0",
|
|
||||||
"common.items.armor.shoulder.leather_1",
|
|
||||||
"common.items.armor.shoulder.leather_0",
|
|
||||||
"common.items.armor.hand.leather_0",
|
|
||||||
"common.items.armor.hand.plate_0",
|
|
||||||
"common.items.weapons.sword.wood_sword",
|
"common.items.weapons.sword.wood_sword",
|
||||||
"common.items.weapons.sword.short_sword_0",
|
"common.items.weapons.sword.short_sword_0",
|
||||||
|
"common.items.weapons.sword.greatsword_2h_simple-0",
|
||||||
|
"common.items.weapons.sword.greatsword_2h_simple-1",
|
||||||
|
"common.items.weapons.sword.greatsword_2h_simple-2",
|
||||||
|
"common.items.weapons.sword.long_2h_simple-0",
|
||||||
|
"common.items.weapons.sword.long_2h_simple-1",
|
||||||
|
"common.items.weapons.sword.long_2h_simple-2",
|
||||||
|
"common.items.weapons.sword.long_2h_simple-3",
|
||||||
|
"common.items.weapons.sword.long_2h_simple-4",
|
||||||
|
"common.items.weapons.sword.long_2h_simple-5",
|
||||||
|
"common.items.weapons.sword.greatsword_2h_dam-0",
|
||||||
|
"common.items.weapons.sword.greatsword_2h_dam-1",
|
||||||
|
"common.items.weapons.sword.greatsword_2h_dam-2",
|
||||||
|
"common.items.weapons.sword.greatsword_2h_orn-0",
|
||||||
|
"common.items.weapons.sword.greatsword_2h_orn-1",
|
||||||
|
"common.items.weapons.sword.greatsword_2h_orn-2",
|
||||||
|
"common.items.weapons.sword.long_2h_dam-0",
|
||||||
|
"common.items.weapons.sword.long_2h_dam-1",
|
||||||
|
"common.items.weapons.sword.long_2h_dam-2",
|
||||||
|
"common.items.weapons.sword.long_2h_dam-3",
|
||||||
|
"common.items.weapons.sword.long_2h_dam-4",
|
||||||
|
"common.items.weapons.sword.long_2h_dam-5",
|
||||||
|
"common.items.weapons.sword.long_2h_orn-0",
|
||||||
|
"common.items.weapons.sword.long_2h_orn-1",
|
||||||
|
"common.items.weapons.sword.long_2h_orn-2",
|
||||||
|
"common.items.weapons.sword.long_2h_orn-3",
|
||||||
|
"common.items.weapons.sword.long_2h_orn-4",
|
||||||
|
"common.items.weapons.sword.long_2h_orn-5",
|
||||||
|
"common.items.weapons.sword.long_2h_simple-0",
|
||||||
|
"common.items.weapons.sword.long_2h_simple-1",
|
||||||
|
"common.items.weapons.sword.long_2h_simple-2",
|
||||||
|
"common.items.weapons.sword.long_2h_simple-3",
|
||||||
|
"common.items.weapons.sword.long_2h_simple-4",
|
||||||
|
"common.items.weapons.sword.long_2h_simple-5",
|
||||||
|
//axes
|
||||||
|
"common.items.weapons.axe.starter_axe",
|
||||||
|
//staves
|
||||||
|
"common.items.weapons.staff.staff_nature",
|
||||||
|
"common.items.weapons.staff.starter_staff",
|
||||||
|
//hammers
|
||||||
|
"common.items.weapons.hammer.starter_hammer",
|
||||||
|
//bows
|
||||||
|
"common.items.weapons.bow.starter_bow",
|
||||||
|
//belts
|
||||||
|
"common.items.armor.belt.plate_0",
|
||||||
|
"common.items.armor.belt.steel_0",
|
||||||
|
"common.items.armor.belt.leather_0",
|
||||||
|
"common.items.armor.belt.leather_2",
|
||||||
"common.items.armor.belt.cloth_blue_0",
|
"common.items.armor.belt.cloth_blue_0",
|
||||||
"common.items.armor.chest.cloth_blue_0",
|
|
||||||
"common.items.armor.foot.cloth_blue_0",
|
|
||||||
"common.items.armor.pants.cloth_blue_0",
|
|
||||||
"common.items.armor.shoulder.cloth_blue_0",
|
|
||||||
"common.items.armor.hand.cloth_blue_0",
|
|
||||||
"common.items.armor.belt.cloth_green_0",
|
"common.items.armor.belt.cloth_green_0",
|
||||||
"common.items.armor.chest.cloth_green_0",
|
|
||||||
"common.items.armor.foot.cloth_green_0",
|
|
||||||
"common.items.armor.pants.cloth_green_0",
|
|
||||||
"common.items.armor.shoulder.cloth_green_0",
|
|
||||||
"common.items.armor.hand.cloth_green_0",
|
|
||||||
"common.items.armor.belt.cloth_purple_0",
|
"common.items.armor.belt.cloth_purple_0",
|
||||||
|
//chests
|
||||||
|
"common.items.armor.chest.plate_green_0",
|
||||||
|
"common.items.armor.chest.leather_0",
|
||||||
|
"common.items.armor.chest.steel_0",
|
||||||
|
"common.items.armor.chest.leather_2",
|
||||||
|
"common.items.armor.chest.cloth_blue_0",
|
||||||
|
"common.items.armor.chest.cloth_green_0",
|
||||||
"common.items.armor.chest.cloth_purple_0",
|
"common.items.armor.chest.cloth_purple_0",
|
||||||
|
//shoes
|
||||||
|
"common.items.armor.foot.plate_0",
|
||||||
|
"common.items.armor.foot.steel_0",
|
||||||
|
"common.items.armor.foot.leather_0",
|
||||||
|
"common.items.armor.foot.leather_2",
|
||||||
|
"common.items.armor.foot.cloth_blue_0",
|
||||||
|
"common.items.armor.foot.cloth_green_0",
|
||||||
"common.items.armor.foot.cloth_purple_0",
|
"common.items.armor.foot.cloth_purple_0",
|
||||||
|
//pants
|
||||||
|
"common.items.armor.pants.plate_green_0",
|
||||||
|
"common.items.armor.pants.green_0",
|
||||||
|
"common.items.armor.pants.leather_0",
|
||||||
|
"common.items.armor.pants.steel_0",
|
||||||
|
"common.items.armor.pants.cloth_blue_0",
|
||||||
|
"common.items.armor.pants.cloth_green_0",
|
||||||
"common.items.armor.pants.cloth_purple_0",
|
"common.items.armor.pants.cloth_purple_0",
|
||||||
|
//shoulders
|
||||||
|
"common.items.armor.shoulder.plate_0",
|
||||||
|
"common.items.armor.shoulder.steel_0",
|
||||||
|
"common.items.armor.shoulder.leather_1",
|
||||||
|
"common.items.armor.shoulder.leather_0",
|
||||||
|
"common.items.armor.shoulder.leather_2",
|
||||||
|
"common.items.armor.shoulder.cloth_blue_0",
|
||||||
|
"common.items.armor.shoulder.cloth_green_0",
|
||||||
"common.items.armor.shoulder.cloth_purple_0",
|
"common.items.armor.shoulder.cloth_purple_0",
|
||||||
|
//gloves
|
||||||
|
"common.items.armor.hand.leather_0",
|
||||||
|
"common.items.armor.hand.leather_2",
|
||||||
|
"common.items.armor.hand.steel_0",
|
||||||
|
"common.items.armor.hand.plate_0",
|
||||||
|
"common.items.armor.hand.cloth_blue_0",
|
||||||
|
"common.items.armor.hand.cloth_green_0",
|
||||||
"common.items.armor.hand.cloth_purple_0",
|
"common.items.armor.hand.cloth_purple_0",
|
||||||
|
//rings
|
||||||
"common.items.armor.ring.ring_0",
|
"common.items.armor.ring.ring_0",
|
||||||
|
//capes
|
||||||
"common.items.armor.back.short_0",
|
"common.items.armor.back.short_0",
|
||||||
|
//necks
|
||||||
"common.items.armor.neck.neck_0",
|
"common.items.armor.neck.neck_0",
|
||||||
]
|
]
|
||||||
.choose(&mut rand::thread_rng())
|
.choose(&mut rand::thread_rng())
|
||||||
|
@ -50,6 +50,7 @@ pub enum SwordKind {
|
|||||||
LongFine3,
|
LongFine3,
|
||||||
LongFine4,
|
LongFine4,
|
||||||
LongFine5,
|
LongFine5,
|
||||||
|
CultPurp0,
|
||||||
}
|
}
|
||||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||||
pub enum AxeKind {
|
pub enum AxeKind {
|
||||||
@ -137,6 +138,17 @@ impl Tool {
|
|||||||
use ToolKind::*;
|
use ToolKind::*;
|
||||||
|
|
||||||
match self.kind {
|
match self.kind {
|
||||||
|
Sword(SwordKind::CultPurp0) => vec![
|
||||||
|
TripleStrike {
|
||||||
|
base_damage: 10,
|
||||||
|
needs_timing: false,
|
||||||
|
},
|
||||||
|
DashMelee {
|
||||||
|
buildup_duration: Duration::from_millis(500),
|
||||||
|
recover_duration: Duration::from_millis(500),
|
||||||
|
base_damage: 20,
|
||||||
|
},
|
||||||
|
],
|
||||||
Sword(_) => vec![
|
Sword(_) => vec![
|
||||||
TripleStrike {
|
TripleStrike {
|
||||||
base_damage: 5,
|
base_damage: 5,
|
||||||
|
@ -299,7 +299,7 @@ impl Inventory {
|
|||||||
impl Default for Inventory {
|
impl Default for Inventory {
|
||||||
fn default() -> Inventory {
|
fn default() -> Inventory {
|
||||||
let mut inventory = Inventory {
|
let mut inventory = Inventory {
|
||||||
slots: vec![None; 18],
|
slots: vec![None; 36],
|
||||||
amount: 0,
|
amount: 0,
|
||||||
};
|
};
|
||||||
inventory.push(assets::load_expect_cloned("common.items.cheese"));
|
inventory.push(assets::load_expect_cloned("common.items.cheese"));
|
||||||
|
@ -10,6 +10,7 @@ use common::{
|
|||||||
vol::{ReadVol, Vox},
|
vol::{ReadVol, Vox},
|
||||||
};
|
};
|
||||||
use log::error;
|
use log::error;
|
||||||
|
use rand::seq::SliceRandom;
|
||||||
use specs::{join::Join, Entity as EcsEntity, WorldExt};
|
use specs::{join::Join, Entity as EcsEntity, WorldExt};
|
||||||
use vek::Vec3;
|
use vek::Vec3;
|
||||||
|
|
||||||
@ -112,7 +113,179 @@ pub fn handle_destroy(server: &mut Server, entity: EcsEntity, cause: HealthSourc
|
|||||||
item_drops.remove(entity);
|
item_drops.remove(entity);
|
||||||
item_drop.0
|
item_drop.0
|
||||||
} else {
|
} else {
|
||||||
assets::load_expect_cloned::<Item>("common.items.cheese")
|
assets::load_expect_cloned::<Item>(
|
||||||
|
[
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.mushroom",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.mushroom",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.mushroom",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.mushroom",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.collar",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.mushroom",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.mushroom",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.mushroom",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.mushroom",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.collar",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.mushroom",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.mushroom",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.mushroom",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.mushroom",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.collar",
|
||||||
|
"common.items.veloritefrag",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.mushroom",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.mushroom",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.mushroom",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.mushroom",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.collar",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.mushroom",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.mushroom",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.mushroom",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.mushroom",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.collar",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.mushroom",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.mushroom",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.mushroom",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.cheese",
|
||||||
|
"common.items.mushroom",
|
||||||
|
"common.items.apple",
|
||||||
|
"common.items.collar",
|
||||||
|
"common.items.collar",
|
||||||
|
"common.items.collar",
|
||||||
|
"common.items.collar",
|
||||||
|
"common.items.collar",
|
||||||
|
"common.items.veloritefrag",
|
||||||
|
"common.items.veloritefrag",
|
||||||
|
"common.items.veloritefrag",
|
||||||
|
"common.items.veloritefrag",
|
||||||
|
"common.items.veloritefrag",
|
||||||
|
"common.items.veloritefrag",
|
||||||
|
"common.items.veloritefrag",
|
||||||
|
"common.items.veloritefrag",
|
||||||
|
"common.items.velorite",
|
||||||
|
"common.items.armor.ring.ring_0",
|
||||||
|
"common.items.armor.neck.neck_0",
|
||||||
|
"common.items.mushroom",
|
||||||
|
"common.items.coconut",
|
||||||
|
"common.items.coconut",
|
||||||
|
"common.items.coconut",
|
||||||
|
"common.items.coconut",
|
||||||
|
"common.items.coconut",
|
||||||
|
"common.items.potion_minor",
|
||||||
|
"common.items.potion_minor",
|
||||||
|
"common.items.potion_minor",
|
||||||
|
"common.items.potion_minor",
|
||||||
|
"common.items.potion_minor",
|
||||||
|
"common.items.potion_minor",
|
||||||
|
"common.items.weapons.tool.broom",
|
||||||
|
"common.items.weapons.tool.shovel-1",
|
||||||
|
"common.items.weapons.staff.staff_nature",
|
||||||
|
"common.items.flowers.yellow",
|
||||||
|
"common.items.armor.pants.worker_blue_0",
|
||||||
|
"common.items.armor.chest.worker_yellow_0",
|
||||||
|
"common.items.armor.chest.worker_green_0",
|
||||||
|
"common.items.armor.chest.worker_orange_0",
|
||||||
|
"common.items.armor.back.short_0",
|
||||||
|
"common.items.weapons.staff.staff_nature",
|
||||||
|
"common.items.weapons.sword.starter_sword",
|
||||||
|
"common.items.weapons.axe.starter_axe",
|
||||||
|
"common.items.weapons.staff.staff_nature",
|
||||||
|
"common.items.weapons.hammer.starter_hammer",
|
||||||
|
"common.items.weapons.bow.starter_bow",
|
||||||
|
"common.items.weapons.staff.starter_staff",
|
||||||
|
"common.items.weapons.sword.starter_sword",
|
||||||
|
"common.items.weapons.axe.starter_axe",
|
||||||
|
"common.items.weapons.staff.staff_nature",
|
||||||
|
"common.items.weapons.hammer.starter_hammer",
|
||||||
|
"common.items.weapons.bow.starter_bow",
|
||||||
|
"common.items.weapons.staff.starter_staff",
|
||||||
|
"common.items.weapons.sword.starter_sword",
|
||||||
|
"common.items.weapons.axe.starter_axe",
|
||||||
|
"common.items.weapons.staff.staff_nature",
|
||||||
|
"common.items.weapons.hammer.starter_hammer",
|
||||||
|
"common.items.weapons.bow.starter_bow",
|
||||||
|
"common.items.weapons.staff.starter_staff",
|
||||||
|
"common.items.weapons.sword.greatsword_2h_simple-0",
|
||||||
|
"common.items.weapons.sword.greatsword_2h_simple-1",
|
||||||
|
"common.items.weapons.sword.greatsword_2h_simple-2",
|
||||||
|
"common.items.weapons.sword.long_2h_simple-0",
|
||||||
|
"common.items.weapons.sword.long_2h_simple-1",
|
||||||
|
"common.items.weapons.sword.long_2h_simple-2",
|
||||||
|
"common.items.weapons.sword.long_2h_simple-3",
|
||||||
|
"common.items.weapons.sword.long_2h_simple-4",
|
||||||
|
"common.items.weapons.sword.long_2h_simple-5",
|
||||||
|
]
|
||||||
|
.choose(&mut rand::thread_rng())
|
||||||
|
.unwrap(),
|
||||||
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
let _ = state.ecs().write_storage().insert(entity, item);
|
let _ = state.ecs().write_storage().insert(entity, item);
|
||||||
|
@ -0,0 +1,41 @@
|
|||||||
|
-- This migration downgrades the capacity of existing player inventories from 36 to 18. ITEMS WILL BE REMOVED.
|
||||||
|
UPDATE
|
||||||
|
inventory
|
||||||
|
SET
|
||||||
|
items = json_object(
|
||||||
|
'amount',
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
json_extract(items, '$.amount')
|
||||||
|
from
|
||||||
|
inventory
|
||||||
|
),
|
||||||
|
'slots',
|
||||||
|
json_remove(
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
json_extract(items, '$.slots')
|
||||||
|
from
|
||||||
|
inventory
|
||||||
|
),
|
||||||
|
'$[35]',
|
||||||
|
'$[34]',
|
||||||
|
'$[33]',
|
||||||
|
'$[32]',
|
||||||
|
'$[31]',
|
||||||
|
'$[30]',
|
||||||
|
'$[29]',
|
||||||
|
'$[28]',
|
||||||
|
'$[27]',
|
||||||
|
'$[26]',
|
||||||
|
'$[25]',
|
||||||
|
'$[25]',
|
||||||
|
'$[24]',
|
||||||
|
'$[23]',
|
||||||
|
'$[22]',
|
||||||
|
'$[21]',
|
||||||
|
'$[20]',
|
||||||
|
'$[19]',
|
||||||
|
'$[18]'
|
||||||
|
)
|
||||||
|
);
|
58
server/src/migrations/2020-06-02-210738_inv_increase/up.sql
Normal file
58
server/src/migrations/2020-06-02-210738_inv_increase/up.sql
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
-- This migration updates the capacity of existing player inventories from 18 to 36
|
||||||
|
UPDATE
|
||||||
|
inventory
|
||||||
|
SET
|
||||||
|
items = json_object(
|
||||||
|
'amount',
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
json_extract(items, '$.amount')
|
||||||
|
from
|
||||||
|
inventory
|
||||||
|
),
|
||||||
|
'slots',
|
||||||
|
json_insert(
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
json_extract(items, '$.slots')
|
||||||
|
from
|
||||||
|
inventory
|
||||||
|
),
|
||||||
|
'$[18]',
|
||||||
|
json("null"),
|
||||||
|
'$[19]',
|
||||||
|
json("null"),
|
||||||
|
'$[20]',
|
||||||
|
json("null"),
|
||||||
|
'$[21]',
|
||||||
|
json("null"),
|
||||||
|
'$[22]',
|
||||||
|
json("null"),
|
||||||
|
'$[23]',
|
||||||
|
json("null"),
|
||||||
|
'$[24]',
|
||||||
|
json("null"),
|
||||||
|
'$[25]',
|
||||||
|
json("null"),
|
||||||
|
'$[26]',
|
||||||
|
json("null"),
|
||||||
|
'$[27]',
|
||||||
|
json("null"),
|
||||||
|
'$[28]',
|
||||||
|
json("null"),
|
||||||
|
'$[29]',
|
||||||
|
json("null"),
|
||||||
|
'$[30]',
|
||||||
|
json("null"),
|
||||||
|
'$[31]',
|
||||||
|
json("null"),
|
||||||
|
'$[32]',
|
||||||
|
json("null"),
|
||||||
|
'$[33]',
|
||||||
|
json("null"),
|
||||||
|
'$[34]',
|
||||||
|
json("null"),
|
||||||
|
'$[35]',
|
||||||
|
json("null")
|
||||||
|
)
|
||||||
|
);
|
@ -94,6 +94,9 @@ image_ids! {
|
|||||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
<ImageGraphic>
|
<ImageGraphic>
|
||||||
|
|
||||||
|
quest_bg: "voxygen.element.misc_bg.temp_quest_bg",
|
||||||
|
|
||||||
// Buttons
|
// Buttons
|
||||||
|
|
||||||
settings: "voxygen.element.buttons.settings",
|
settings: "voxygen.element.buttons.settings",
|
||||||
|
@ -22,8 +22,6 @@ widget_ids! {
|
|||||||
mmap_button,
|
mmap_button,
|
||||||
mmap_plus,
|
mmap_plus,
|
||||||
mmap_minus,
|
mmap_minus,
|
||||||
zone_display_bg,
|
|
||||||
zone_display,
|
|
||||||
grid,
|
grid,
|
||||||
indicator
|
indicator
|
||||||
}
|
}
|
||||||
|
@ -47,9 +47,8 @@ use crate::{
|
|||||||
use client::{Client, Event as ClientEvent};
|
use client::{Client, Event as ClientEvent};
|
||||||
use common::{assets::load_expect, comp, terrain::TerrainChunk, vol::RectRasterableVol};
|
use common::{assets::load_expect, comp, terrain::TerrainChunk, vol::RectRasterableVol};
|
||||||
use conrod_core::{
|
use conrod_core::{
|
||||||
position::Relative,
|
|
||||||
text::cursor::Index,
|
text::cursor::Index,
|
||||||
widget::{self, Button, Image, Rectangle, Text},
|
widget::{self, Button, Image, Text},
|
||||||
widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Widget,
|
widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Widget,
|
||||||
};
|
};
|
||||||
use specs::{Join, WorldExt};
|
use specs::{Join, WorldExt};
|
||||||
@ -184,6 +183,14 @@ widget_ids! {
|
|||||||
// Free look indicator
|
// Free look indicator
|
||||||
free_look_txt,
|
free_look_txt,
|
||||||
free_look_bg,
|
free_look_bg,
|
||||||
|
|
||||||
|
// Example Quest
|
||||||
|
quest_bg,
|
||||||
|
q_headline_bg,
|
||||||
|
q_headline,
|
||||||
|
q_text_bg,
|
||||||
|
q_text,
|
||||||
|
accept_button,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -439,9 +446,9 @@ pub struct Hud {
|
|||||||
rot_imgs: ImgsRot,
|
rot_imgs: ImgsRot,
|
||||||
new_messages: VecDeque<ClientEvent>,
|
new_messages: VecDeque<ClientEvent>,
|
||||||
show: Show,
|
show: Show,
|
||||||
never_show: bool,
|
//never_show: bool,
|
||||||
intro: bool,
|
//intro: bool,
|
||||||
intro_2: bool,
|
//intro_2: bool,
|
||||||
to_focus: Option<Option<widget::Id>>,
|
to_focus: Option<Option<widget::Id>>,
|
||||||
force_ungrab: bool,
|
force_ungrab: bool,
|
||||||
force_chat_input: Option<String>,
|
force_chat_input: Option<String>,
|
||||||
@ -495,8 +502,8 @@ impl Hud {
|
|||||||
fonts,
|
fonts,
|
||||||
ids,
|
ids,
|
||||||
new_messages: VecDeque::new(),
|
new_messages: VecDeque::new(),
|
||||||
intro: false,
|
//intro: false,
|
||||||
intro_2: false,
|
//intro_2: false,
|
||||||
show: Show {
|
show: Show {
|
||||||
help: false,
|
help: false,
|
||||||
intro: true,
|
intro: true,
|
||||||
@ -517,7 +524,7 @@ impl Hud {
|
|||||||
free_look: false,
|
free_look: false,
|
||||||
},
|
},
|
||||||
to_focus: None,
|
to_focus: None,
|
||||||
never_show: false,
|
//never_show: false,
|
||||||
force_ungrab: false,
|
force_ungrab: false,
|
||||||
force_chat_input: None,
|
force_chat_input: None,
|
||||||
force_chat_cursor: None,
|
force_chat_cursor: None,
|
||||||
@ -1100,146 +1107,68 @@ impl Hud {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Introduction Text
|
// Temporary Example Quest
|
||||||
let intro_text = &self.voxygen_i18n.get("hud.welcome");
|
if self.show.intro && !self.show.esc_menu {
|
||||||
if self.show.intro && !self.show.esc_menu && !self.intro_2 {
|
|
||||||
match global_state.settings.gameplay.intro_show {
|
match global_state.settings.gameplay.intro_show {
|
||||||
Intro::Show => {
|
Intro::Show => {
|
||||||
Rectangle::fill_with(
|
if self.pulse > 20.0 {
|
||||||
[800.0 * 0.8, 850.0 * 0.8],
|
self.show.want_grab = false;
|
||||||
Color::Rgba(0.0, 0.0, 0.0, 0.80),
|
let quest_headline = &self.voxygen_i18n.get("hud.temp_quest_headline");
|
||||||
)
|
let quest_text = &self.voxygen_i18n.get("hud.temp_quest_text");
|
||||||
.top_left_with_margins_on(ui_widgets.window, 180.0 * 0.8, 10.0 * 0.8)
|
Image::new(self.imgs.quest_bg)
|
||||||
.floating(true)
|
.w_h(404.0, 858.0)
|
||||||
.set(self.ids.intro_bg, ui_widgets);
|
.middle_of(ui_widgets.window)
|
||||||
Text::new(intro_text)
|
.set(self.ids.quest_bg, ui_widgets);
|
||||||
.top_left_with_margins_on(self.ids.intro_bg, 10.0, 10.0)
|
|
||||||
.font_size(self.fonts.cyri.scale(16))
|
Text::new(quest_headline)
|
||||||
.font_id(self.fonts.cyri.conrod_id)
|
.mid_top_with_margin_on(self.ids.quest_bg, 310.0)
|
||||||
.color(TEXT_COLOR)
|
.font_size(self.fonts.cyri.scale(30))
|
||||||
.set(self.ids.intro_text, ui_widgets);
|
.font_id(self.fonts.cyri.conrod_id)
|
||||||
if Button::image(self.imgs.button)
|
.color(TEXT_BG)
|
||||||
.w_h(90.0, 35.0)
|
.set(self.ids.q_headline_bg, ui_widgets);
|
||||||
.mid_bottom_with_margin_on(self.ids.intro_bg, 10.0)
|
Text::new(quest_headline)
|
||||||
.label(&self.voxygen_i18n.get("common.close"))
|
.bottom_left_with_margins_on(self.ids.q_headline_bg, 1.0, 1.0)
|
||||||
.label_font_size(self.fonts.cyri.scale(16))
|
.font_size(self.fonts.cyri.scale(30))
|
||||||
.label_font_id(self.fonts.cyri.conrod_id)
|
.font_id(self.fonts.cyri.conrod_id)
|
||||||
.label_color(TEXT_COLOR)
|
.color(TEXT_COLOR)
|
||||||
.label_y(Relative::Scalar(4.0))
|
.set(self.ids.q_headline, ui_widgets);
|
||||||
.hover_image(self.imgs.button_hover)
|
|
||||||
.press_image(self.imgs.button_press)
|
Text::new(quest_text)
|
||||||
.set(self.ids.intro_close, ui_widgets)
|
.down_from(self.ids.q_headline_bg, 40.0)
|
||||||
.was_clicked()
|
.font_size(self.fonts.cyri.scale(17))
|
||||||
{
|
.font_id(self.fonts.cyri.conrod_id)
|
||||||
if self.never_show {
|
.color(TEXT_BG)
|
||||||
events.push(Event::Intro(Intro::Never));
|
.set(self.ids.q_text_bg, ui_widgets);
|
||||||
self.never_show = !self.never_show;
|
Text::new(quest_text)
|
||||||
self.intro = false;
|
.bottom_left_with_margins_on(self.ids.q_text_bg, 1.0, 1.0)
|
||||||
self.intro_2 = false;
|
.font_size(self.fonts.cyri.scale(17))
|
||||||
} else {
|
.font_id(self.fonts.cyri.conrod_id)
|
||||||
|
.color(TEXT_COLOR)
|
||||||
|
.set(self.ids.q_text, ui_widgets);
|
||||||
|
|
||||||
|
if Button::image(self.imgs.button)
|
||||||
|
.w_h(212.0, 52.0)
|
||||||
|
.hover_image(self.imgs.button_hover)
|
||||||
|
.press_image(self.imgs.button_press)
|
||||||
|
.mid_bottom_with_margin_on(self.ids.q_text_bg, -120.0)
|
||||||
|
.label(&self.voxygen_i18n.get("common.accept"))
|
||||||
|
.label_font_id(self.fonts.cyri.conrod_id)
|
||||||
|
.label_font_size(self.fonts.cyri.scale(22))
|
||||||
|
.label_color(TEXT_COLOR)
|
||||||
|
.label_y(conrod_core::position::Relative::Scalar(1.0))
|
||||||
|
.set(self.ids.accept_button, ui_widgets)
|
||||||
|
.was_clicked()
|
||||||
|
{
|
||||||
self.show.intro = !self.show.intro;
|
self.show.intro = !self.show.intro;
|
||||||
self.intro = false;
|
events.push(Event::Intro(Intro::Never));
|
||||||
self.intro_2 = false;
|
self.show.want_grab = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if Button::image(if self.never_show {
|
|
||||||
self.imgs.checkbox_checked
|
|
||||||
} else {
|
|
||||||
self.imgs.checkbox
|
|
||||||
})
|
|
||||||
.w_h(20.0, 20.0)
|
|
||||||
.right_from(self.ids.intro_close, 10.0)
|
|
||||||
.hover_image(if self.never_show {
|
|
||||||
self.imgs.checkbox_checked_mo
|
|
||||||
} else {
|
|
||||||
self.imgs.checkbox_mo
|
|
||||||
})
|
|
||||||
.press_image(self.imgs.checkbox_press)
|
|
||||||
.set(self.ids.intro_check, ui_widgets)
|
|
||||||
.was_clicked()
|
|
||||||
{
|
|
||||||
self.never_show = !self.never_show
|
|
||||||
};
|
|
||||||
Text::new(&self.voxygen_i18n.get("hud.do_not_show_on_startup"))
|
|
||||||
.right_from(self.ids.intro_check, 10.0)
|
|
||||||
.font_size(self.fonts.cyri.scale(10))
|
|
||||||
.font_id(self.fonts.cyri.conrod_id)
|
|
||||||
.color(TEXT_COLOR)
|
|
||||||
.set(self.ids.intro_check_text, ui_widgets);
|
|
||||||
// X-button
|
|
||||||
if Button::image(self.imgs.close_button)
|
|
||||||
.w_h(40.0, 40.0)
|
|
||||||
.hover_image(self.imgs.close_button_hover)
|
|
||||||
.press_image(self.imgs.close_button_press)
|
|
||||||
.top_right_with_margins_on(self.ids.intro_bg, 0.0, 0.0)
|
|
||||||
.color(Color::Rgba(1.0, 1.0, 1.0, 0.8))
|
|
||||||
.set(self.ids.intro_close_4, ui_widgets)
|
|
||||||
.was_clicked()
|
|
||||||
{
|
|
||||||
if self.never_show {
|
|
||||||
events.push(Event::Intro(Intro::Never));
|
|
||||||
self.never_show = !self.never_show;
|
|
||||||
self.intro = false;
|
|
||||||
self.intro_2 = false;
|
|
||||||
} else {
|
|
||||||
self.show.intro = !self.show.intro;
|
|
||||||
self.intro = false;
|
|
||||||
self.intro_2 = false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
Intro::Never => {},
|
Intro::Never => {},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.intro_2 && !self.show.esc_menu {
|
|
||||||
Rectangle::fill_with([800.0, 850.0], Color::Rgba(0.0, 0.0, 0.0, 0.80))
|
|
||||||
.top_left_with_margins_on(ui_widgets.window, 180.0, 10.0)
|
|
||||||
.floating(true)
|
|
||||||
.set(self.ids.intro_bg, ui_widgets);
|
|
||||||
Text::new(intro_text)
|
|
||||||
.top_left_with_margins_on(self.ids.intro_bg, 10.0, 10.0)
|
|
||||||
.font_size(self.fonts.cyri.scale(20))
|
|
||||||
.font_id(self.fonts.cyri.conrod_id)
|
|
||||||
.color(TEXT_COLOR)
|
|
||||||
.set(self.ids.intro_text, ui_widgets);
|
|
||||||
if Button::image(self.imgs.button)
|
|
||||||
.w_h(100.0, 50.0)
|
|
||||||
.mid_bottom_with_margin_on(self.ids.intro_bg, 10.0)
|
|
||||||
.label(&self.voxygen_i18n.get("common.close"))
|
|
||||||
.label_font_size(self.fonts.cyri.scale(20))
|
|
||||||
.label_font_id(self.fonts.cyri.conrod_id)
|
|
||||||
.label_color(TEXT_COLOR)
|
|
||||||
.hover_image(self.imgs.button_hover)
|
|
||||||
.press_image(self.imgs.button_press)
|
|
||||||
.set(self.ids.intro_close_3, ui_widgets)
|
|
||||||
.was_clicked()
|
|
||||||
{
|
|
||||||
self.intro_2 = false;
|
|
||||||
}
|
|
||||||
// X-button
|
|
||||||
if Button::image(self.imgs.close_button)
|
|
||||||
.w_h(40.0, 40.0)
|
|
||||||
.hover_image(self.imgs.close_button_hover)
|
|
||||||
.press_image(self.imgs.close_button_press)
|
|
||||||
.top_right_with_margins_on(self.ids.intro_bg, 0.0, 0.0)
|
|
||||||
.color(Color::Rgba(1.0, 1.0, 1.0, 0.8))
|
|
||||||
.set(self.ids.intro_close_4, ui_widgets)
|
|
||||||
.was_clicked()
|
|
||||||
{
|
|
||||||
if self.never_show {
|
|
||||||
events.push(Event::Intro(Intro::Never));
|
|
||||||
self.never_show = !self.never_show;
|
|
||||||
self.intro = false;
|
|
||||||
self.intro_2 = false;
|
|
||||||
} else {
|
|
||||||
self.show.intro = !self.show.intro;
|
|
||||||
self.intro = false;
|
|
||||||
self.intro_2 = false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// Display debug window.
|
// Display debug window.
|
||||||
if global_state.settings.gameplay.toggle_debug {
|
if global_state.settings.gameplay.toggle_debug {
|
||||||
// Alpha Version
|
// Alpha Version
|
||||||
@ -1481,8 +1410,14 @@ impl Hud {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Popup
|
// Popup
|
||||||
Popup::new(&self.voxygen_i18n, client, &self.new_messages, &self.fonts)
|
Popup::new(
|
||||||
.set(self.ids.popup, ui_widgets);
|
&self.voxygen_i18n,
|
||||||
|
client,
|
||||||
|
&self.new_messages,
|
||||||
|
&self.fonts,
|
||||||
|
&self.show,
|
||||||
|
)
|
||||||
|
.set(self.ids.popup, ui_widgets);
|
||||||
|
|
||||||
// MiniMap
|
// MiniMap
|
||||||
match MiniMap::new(
|
match MiniMap::new(
|
||||||
@ -1569,6 +1504,7 @@ impl Hud {
|
|||||||
tooltip_manager,
|
tooltip_manager,
|
||||||
&mut self.slot_manager,
|
&mut self.slot_manager,
|
||||||
&self.voxygen_i18n,
|
&self.voxygen_i18n,
|
||||||
|
&self.show,
|
||||||
)
|
)
|
||||||
.set(self.ids.skillbar, ui_widgets);
|
.set(self.ids.skillbar, ui_widgets);
|
||||||
}
|
}
|
||||||
@ -1682,9 +1618,6 @@ impl Hud {
|
|||||||
settings_window::Event::CrosshairTransp(crosshair_transp) => {
|
settings_window::Event::CrosshairTransp(crosshair_transp) => {
|
||||||
events.push(Event::CrosshairTransp(crosshair_transp));
|
events.push(Event::CrosshairTransp(crosshair_transp));
|
||||||
},
|
},
|
||||||
settings_window::Event::Intro(intro_show) => {
|
|
||||||
events.push(Event::Intro(intro_show));
|
|
||||||
},
|
|
||||||
settings_window::Event::AdjustMusicVolume(music_volume) => {
|
settings_window::Event::AdjustMusicVolume(music_volume) => {
|
||||||
events.push(Event::AdjustMusicVolume(music_volume));
|
events.push(Event::AdjustMusicVolume(music_volume));
|
||||||
},
|
},
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use super::Show;
|
||||||
use crate::{i18n::VoxygenLocalization, ui::fonts::ConrodVoxygenFonts};
|
use crate::{i18n::VoxygenLocalization, ui::fonts::ConrodVoxygenFonts};
|
||||||
use client::{self, Client, Event as ClientEvent};
|
use client::{self, Client, Event as ClientEvent};
|
||||||
use common::msg::Notification;
|
use common::msg::Notification;
|
||||||
@ -26,6 +27,7 @@ pub struct Popup<'a> {
|
|||||||
fonts: &'a ConrodVoxygenFonts,
|
fonts: &'a ConrodVoxygenFonts,
|
||||||
#[conrod(common_builder)]
|
#[conrod(common_builder)]
|
||||||
common: widget::CommonBuilder,
|
common: widget::CommonBuilder,
|
||||||
|
show: &'a Show,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Popup notifications for messages such as <Chunk Name>, Waypoint Saved,
|
/// Popup notifications for messages such as <Chunk Name>, Waypoint Saved,
|
||||||
@ -36,6 +38,7 @@ impl<'a> Popup<'a> {
|
|||||||
client: &'a Client,
|
client: &'a Client,
|
||||||
new_messages: &'a VecDeque<ClientEvent>,
|
new_messages: &'a VecDeque<ClientEvent>,
|
||||||
fonts: &'a ConrodVoxygenFonts,
|
fonts: &'a ConrodVoxygenFonts,
|
||||||
|
show: &'a Show,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
Self {
|
Self {
|
||||||
voxygen_i18n,
|
voxygen_i18n,
|
||||||
@ -43,6 +46,7 @@ impl<'a> Popup<'a> {
|
|||||||
new_messages,
|
new_messages,
|
||||||
fonts,
|
fonts,
|
||||||
common: widget::CommonBuilder::default(),
|
common: widget::CommonBuilder::default(),
|
||||||
|
show,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -173,27 +177,30 @@ impl<'a> Widget for Popup<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Display info as popup
|
// Display info as popup
|
||||||
if let Some(info) = state.infos.front() {
|
if !self.show.intro {
|
||||||
let seconds = state.last_info_update.elapsed().as_secs_f32();
|
if let Some(info) = state.infos.front() {
|
||||||
let fade = if seconds < FADE_IN {
|
let seconds = state.last_info_update.elapsed().as_secs_f32();
|
||||||
seconds / FADE_IN
|
let fade = if seconds < FADE_IN {
|
||||||
} else if seconds < FADE_IN + FADE_HOLD {
|
seconds / FADE_IN
|
||||||
1.0
|
} else if seconds < FADE_IN + FADE_HOLD {
|
||||||
} else {
|
1.0
|
||||||
(1.0 - (seconds - FADE_IN - FADE_HOLD) / FADE_OUT).max(0.0)
|
} else {
|
||||||
};
|
(1.0 - (seconds - FADE_IN - FADE_HOLD) / FADE_OUT).max(0.0)
|
||||||
Text::new(info)
|
};
|
||||||
.mid_top_with_margin_on(ui.window, 100.0)
|
|
||||||
.font_size(self.fonts.cyri.scale(20))
|
Text::new(info)
|
||||||
.font_id(self.fonts.cyri.conrod_id)
|
.mid_top_with_margin_on(ui.window, 100.0)
|
||||||
.color(bg_color(fade))
|
.font_size(self.fonts.cyri.scale(20))
|
||||||
.set(state.ids.info_bg, ui);
|
.font_id(self.fonts.cyri.conrod_id)
|
||||||
Text::new(info)
|
.color(bg_color(fade))
|
||||||
.top_left_with_margins_on(state.ids.info_bg, -1.0, -1.0)
|
.set(state.ids.info_bg, ui);
|
||||||
.font_size(self.fonts.cyri.scale(20))
|
Text::new(info)
|
||||||
.font_id(self.fonts.cyri.conrod_id)
|
.top_left_with_margins_on(state.ids.info_bg, -1.0, -1.0)
|
||||||
.color(info_color(fade))
|
.font_size(self.fonts.cyri.scale(20))
|
||||||
.set(state.ids.info_text, ui);
|
.font_id(self.fonts.cyri.conrod_id)
|
||||||
|
.color(info_color(fade))
|
||||||
|
.set(state.ids.info_text, ui);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get next message from queue
|
// Get next message from queue
|
||||||
@ -207,27 +214,29 @@ impl<'a> Widget for Popup<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Display message as popup
|
// Display message as popup
|
||||||
if let Some(message) = state.messages.front() {
|
if !self.show.intro {
|
||||||
let seconds = state.last_message_update.elapsed().as_secs_f32();
|
if let Some(message) = state.messages.front() {
|
||||||
let fade = if seconds < FADE_IN {
|
let seconds = state.last_message_update.elapsed().as_secs_f32();
|
||||||
seconds / FADE_IN
|
let fade = if seconds < FADE_IN {
|
||||||
} else if seconds < FADE_IN + FADE_HOLD {
|
seconds / FADE_IN
|
||||||
1.0
|
} else if seconds < FADE_IN + FADE_HOLD {
|
||||||
} else {
|
1.0
|
||||||
(1.0 - (seconds - FADE_IN - FADE_HOLD) / FADE_OUT).max(0.0)
|
} else {
|
||||||
};
|
(1.0 - (seconds - FADE_IN - FADE_HOLD) / FADE_OUT).max(0.0)
|
||||||
Text::new(message)
|
};
|
||||||
.mid_top_with_margin_on(ui.window, 200.0)
|
Text::new(message)
|
||||||
.font_size(self.fonts.alkhemi.scale(70))
|
.mid_top_with_margin_on(ui.window, 200.0)
|
||||||
.font_id(self.fonts.alkhemi.conrod_id)
|
.font_size(self.fonts.alkhemi.scale(70))
|
||||||
.color(bg_color(fade))
|
.font_id(self.fonts.alkhemi.conrod_id)
|
||||||
.set(state.ids.message_bg, ui);
|
.color(bg_color(fade))
|
||||||
Text::new(message)
|
.set(state.ids.message_bg, ui);
|
||||||
.top_left_with_margins_on(state.ids.message_bg, -2.5, -2.5)
|
Text::new(message)
|
||||||
.font_size(self.fonts.alkhemi.scale(70))
|
.top_left_with_margins_on(state.ids.message_bg, -2.5, -2.5)
|
||||||
.font_id(self.fonts.alkhemi.conrod_id)
|
.font_size(self.fonts.alkhemi.scale(70))
|
||||||
.color(message_color(fade))
|
.font_id(self.fonts.alkhemi.conrod_id)
|
||||||
.set(state.ids.message_text, ui);
|
.color(message_color(fade))
|
||||||
|
.set(state.ids.message_text, ui);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
use super::{
|
use super::{
|
||||||
img_ids::Imgs, BarNumbers, CrosshairType, Intro, PressBehavior, ShortcutNumbers, Show, XpBar,
|
img_ids::Imgs, BarNumbers, CrosshairType, PressBehavior, ShortcutNumbers, Show, XpBar, MENU_BG,
|
||||||
MENU_BG, TEXT_COLOR,
|
TEXT_COLOR,
|
||||||
};
|
};
|
||||||
use crate::{
|
use crate::{
|
||||||
i18n::{list_localizations, LanguageMetadata, VoxygenLocalization},
|
i18n::{list_localizations, LanguageMetadata, VoxygenLocalization},
|
||||||
@ -210,7 +210,6 @@ pub enum Event {
|
|||||||
ToggleShortcutNumbers(ShortcutNumbers),
|
ToggleShortcutNumbers(ShortcutNumbers),
|
||||||
ChangeTab(SettingsTab),
|
ChangeTab(SettingsTab),
|
||||||
Close,
|
Close,
|
||||||
Intro(Intro),
|
|
||||||
AdjustMousePan(u32),
|
AdjustMousePan(u32),
|
||||||
AdjustMouseZoom(u32),
|
AdjustMouseZoom(u32),
|
||||||
ToggleZoomInvert(bool),
|
ToggleZoomInvert(bool),
|
||||||
@ -407,37 +406,10 @@ impl<'a> Widget for SettingsWindow<'a> {
|
|||||||
.graphics_for(state.ids.debug_button)
|
.graphics_for(state.ids.debug_button)
|
||||||
.color(TEXT_COLOR)
|
.color(TEXT_COLOR)
|
||||||
.set(state.ids.debug_button_label, ui);
|
.set(state.ids.debug_button_label, ui);
|
||||||
// Tips
|
|
||||||
if Button::image(match self.global_state.settings.gameplay.intro_show {
|
|
||||||
Intro::Show => self.imgs.checkbox_checked,
|
|
||||||
Intro::Never => self.imgs.checkbox,
|
|
||||||
})
|
|
||||||
.w_h(20.0, 20.0)
|
|
||||||
.down_from(state.ids.debug_button, 8.0)
|
|
||||||
.hover_image(match self.global_state.settings.gameplay.intro_show {
|
|
||||||
Intro::Show => self.imgs.checkbox_checked_mo,
|
|
||||||
Intro::Never => self.imgs.checkbox_mo,
|
|
||||||
})
|
|
||||||
.press_image(self.imgs.checkbox_press)
|
|
||||||
.set(state.ids.tips_button, ui)
|
|
||||||
.was_clicked()
|
|
||||||
{
|
|
||||||
match self.global_state.settings.gameplay.intro_show {
|
|
||||||
Intro::Show => events.push(Event::Intro(Intro::Never)),
|
|
||||||
Intro::Never => events.push(Event::Intro(Intro::Show)),
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Text::new(&self.localized_strings.get("hud.settings.tips_on_startup"))
|
|
||||||
.right_from(state.ids.tips_button, 10.0)
|
|
||||||
.font_size(self.fonts.cyri.scale(14))
|
|
||||||
.font_id(self.fonts.cyri.conrod_id)
|
|
||||||
.graphics_for(state.ids.button_help)
|
|
||||||
.color(TEXT_COLOR)
|
|
||||||
.set(state.ids.tips_button_label, ui);
|
|
||||||
|
|
||||||
// Ui Scale
|
// Ui Scale
|
||||||
Text::new(&self.localized_strings.get("hud.settings.ui_scale"))
|
Text::new(&self.localized_strings.get("hud.settings.ui_scale"))
|
||||||
.down_from(state.ids.tips_button, 20.0)
|
.down_from(state.ids.debug_button, 20.0)
|
||||||
.font_size(self.fonts.cyri.scale(18))
|
.font_size(self.fonts.cyri.scale(18))
|
||||||
.font_id(self.fonts.cyri.conrod_id)
|
.font_id(self.fonts.cyri.conrod_id)
|
||||||
.color(TEXT_COLOR)
|
.color(TEXT_COLOR)
|
||||||
|
@ -2,8 +2,8 @@ use super::{
|
|||||||
hotbar,
|
hotbar,
|
||||||
img_ids::{Imgs, ImgsRot},
|
img_ids::{Imgs, ImgsRot},
|
||||||
item_imgs::ItemImgs,
|
item_imgs::ItemImgs,
|
||||||
slots, BarNumbers, ShortcutNumbers, XpBar, BLACK, CRITICAL_HP_COLOR, HP_COLOR, LOW_HP_COLOR,
|
slots, BarNumbers, ShortcutNumbers, Show, XpBar, BLACK, CRITICAL_HP_COLOR, HP_COLOR,
|
||||||
MANA_COLOR, TEXT_COLOR, XP_COLOR,
|
LOW_HP_COLOR, MANA_COLOR, TEXT_COLOR, XP_COLOR,
|
||||||
};
|
};
|
||||||
use crate::{
|
use crate::{
|
||||||
i18n::VoxygenLocalization,
|
i18n::VoxygenLocalization,
|
||||||
@ -135,6 +135,7 @@ pub struct Skillbar<'a> {
|
|||||||
#[conrod(common_builder)]
|
#[conrod(common_builder)]
|
||||||
common: widget::CommonBuilder,
|
common: widget::CommonBuilder,
|
||||||
current_resource: ResourceType,
|
current_resource: ResourceType,
|
||||||
|
show: &'a Show,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Skillbar<'a> {
|
impl<'a> Skillbar<'a> {
|
||||||
@ -155,6 +156,7 @@ impl<'a> Skillbar<'a> {
|
|||||||
tooltip_manager: &'a mut TooltipManager,
|
tooltip_manager: &'a mut TooltipManager,
|
||||||
slot_manager: &'a mut slots::SlotManager,
|
slot_manager: &'a mut slots::SlotManager,
|
||||||
localized_strings: &'a std::sync::Arc<VoxygenLocalization>,
|
localized_strings: &'a std::sync::Arc<VoxygenLocalization>,
|
||||||
|
show: &'a Show,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
Self {
|
Self {
|
||||||
global_state,
|
global_state,
|
||||||
@ -175,6 +177,7 @@ impl<'a> Skillbar<'a> {
|
|||||||
tooltip_manager,
|
tooltip_manager,
|
||||||
slot_manager,
|
slot_manager,
|
||||||
localized_strings,
|
localized_strings,
|
||||||
|
show,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -230,63 +233,64 @@ impl<'a> Widget for Skillbar<'a> {
|
|||||||
let localized_strings = self.localized_strings;
|
let localized_strings = self.localized_strings;
|
||||||
|
|
||||||
// Level Up Message
|
// Level Up Message
|
||||||
|
if !self.show.intro {
|
||||||
|
let current_level = self.stats.level.level();
|
||||||
|
const FADE_IN_LVL: f32 = 1.0;
|
||||||
|
const FADE_HOLD_LVL: f32 = 3.0;
|
||||||
|
const FADE_OUT_LVL: f32 = 2.0;
|
||||||
|
// Fade
|
||||||
|
// Check if no other popup is displayed and a new one is needed
|
||||||
|
if state.last_update_level.elapsed()
|
||||||
|
> Duration::from_secs_f32(FADE_IN_LVL + FADE_HOLD_LVL + FADE_OUT_LVL)
|
||||||
|
&& state.last_level != current_level
|
||||||
|
{
|
||||||
|
// Update last_value
|
||||||
|
state.update(|s| s.last_level = current_level);
|
||||||
|
state.update(|s| s.last_update_level = Instant::now());
|
||||||
|
};
|
||||||
|
|
||||||
let current_level = self.stats.level.level();
|
let seconds_level = state.last_update_level.elapsed().as_secs_f32();
|
||||||
const FADE_IN_LVL: f32 = 1.0;
|
let fade_level = if current_level == 1 {
|
||||||
const FADE_HOLD_LVL: f32 = 3.0;
|
0.0
|
||||||
const FADE_OUT_LVL: f32 = 2.0;
|
} else if seconds_level < FADE_IN_LVL {
|
||||||
// Fade
|
seconds_level / FADE_IN_LVL
|
||||||
// Check if no other popup is displayed and a new one is needed
|
} else if seconds_level < FADE_IN_LVL + FADE_HOLD_LVL {
|
||||||
if state.last_update_level.elapsed()
|
1.0
|
||||||
> Duration::from_secs_f32(FADE_IN_LVL + FADE_HOLD_LVL + FADE_OUT_LVL)
|
} else {
|
||||||
&& state.last_level != current_level
|
(1.0 - (seconds_level - FADE_IN_LVL - FADE_HOLD_LVL) / FADE_OUT_LVL).max(0.0)
|
||||||
{
|
};
|
||||||
// Update last_value
|
// Contents
|
||||||
state.update(|s| s.last_level = current_level);
|
Rectangle::fill_with([82.0 * 4.0, 40.0 * 4.0], color::TRANSPARENT)
|
||||||
state.update(|s| s.last_update_level = Instant::now());
|
.mid_top_with_margin_on(ui.window, 300.0)
|
||||||
};
|
.set(state.ids.level_align, ui);
|
||||||
|
let level_up_text = &localized_strings
|
||||||
let seconds_level = state.last_update_level.elapsed().as_secs_f32();
|
.get("char_selection.level_fmt")
|
||||||
let fade_level = if current_level == 1 {
|
.replace("{level_nb}", &self.stats.level.level().to_string());
|
||||||
0.0
|
Text::new(&level_up_text)
|
||||||
} else if seconds_level < FADE_IN_LVL {
|
.middle_of(state.ids.level_align)
|
||||||
seconds_level / FADE_IN_LVL
|
.font_size(self.fonts.cyri.scale(30))
|
||||||
} else if seconds_level < FADE_IN_LVL + FADE_HOLD_LVL {
|
.font_id(self.fonts.cyri.conrod_id)
|
||||||
1.0
|
.color(Color::Rgba(0.0, 0.0, 0.0, fade_level))
|
||||||
} else {
|
.set(state.ids.level_message_bg, ui);
|
||||||
(1.0 - (seconds_level - FADE_IN_LVL - FADE_HOLD_LVL) / FADE_OUT_LVL).max(0.0)
|
Text::new(&level_up_text)
|
||||||
};
|
.bottom_left_with_margins_on(state.ids.level_message_bg, 2.0, 2.0)
|
||||||
// Contents
|
.font_size(self.fonts.cyri.scale(30))
|
||||||
Rectangle::fill_with([82.0 * 4.0, 40.0 * 4.0], color::TRANSPARENT)
|
.font_id(self.fonts.cyri.conrod_id)
|
||||||
.mid_top_with_margin_on(ui.window, 300.0)
|
.color(Color::Rgba(1.0, 1.0, 1.0, fade_level))
|
||||||
.set(state.ids.level_align, ui);
|
.set(state.ids.level_message, ui);
|
||||||
let level_up_text = &localized_strings
|
Image::new(self.imgs.level_up)
|
||||||
.get("char_selection.level_fmt")
|
.w_h(82.0 * 4.0, 9.0 * 4.0)
|
||||||
.replace("{level_nb}", &self.stats.level.level().to_string());
|
.mid_top_with_margin_on(state.ids.level_align, 0.0)
|
||||||
Text::new(&level_up_text)
|
.color(Some(Color::Rgba(1.0, 1.0, 1.0, fade_level)))
|
||||||
.middle_of(state.ids.level_align)
|
.graphics_for(state.ids.level_align)
|
||||||
.font_size(self.fonts.cyri.scale(30))
|
.set(state.ids.level_up, ui);
|
||||||
.font_id(self.fonts.cyri.conrod_id)
|
Image::new(self.imgs.level_down)
|
||||||
.color(Color::Rgba(0.0, 0.0, 0.0, fade_level))
|
.w_h(82.0 * 4.0, 9.0 * 4.0)
|
||||||
.set(state.ids.level_message_bg, ui);
|
.mid_bottom_with_margin_on(state.ids.level_align, 0.0)
|
||||||
Text::new(&level_up_text)
|
.color(Some(Color::Rgba(1.0, 1.0, 1.0, fade_level)))
|
||||||
.bottom_left_with_margins_on(state.ids.level_message_bg, 2.0, 2.0)
|
.graphics_for(state.ids.level_align)
|
||||||
.font_size(self.fonts.cyri.scale(30))
|
.set(state.ids.level_down, ui);
|
||||||
.font_id(self.fonts.cyri.conrod_id)
|
}
|
||||||
.color(Color::Rgba(1.0, 1.0, 1.0, fade_level))
|
|
||||||
.set(state.ids.level_message, ui);
|
|
||||||
Image::new(self.imgs.level_up)
|
|
||||||
.w_h(82.0 * 4.0, 9.0 * 4.0)
|
|
||||||
.mid_top_with_margin_on(state.ids.level_align, 0.0)
|
|
||||||
.color(Some(Color::Rgba(1.0, 1.0, 1.0, fade_level)))
|
|
||||||
.graphics_for(state.ids.level_align)
|
|
||||||
.set(state.ids.level_up, ui);
|
|
||||||
Image::new(self.imgs.level_down)
|
|
||||||
.w_h(82.0 * 4.0, 9.0 * 4.0)
|
|
||||||
.mid_bottom_with_margin_on(state.ids.level_align, 0.0)
|
|
||||||
.color(Some(Color::Rgba(1.0, 1.0, 1.0, fade_level)))
|
|
||||||
.graphics_for(state.ids.level_align)
|
|
||||||
.set(state.ids.level_down, ui);
|
|
||||||
// Death message
|
// Death message
|
||||||
if self.stats.is_dead {
|
if self.stats.is_dead {
|
||||||
if let Some(key) = self
|
if let Some(key) = self
|
||||||
|
@ -486,23 +486,50 @@ impl Floor {
|
|||||||
npc::get_npc_name(npc::NpcKind::Humanoid)
|
npc::get_npc_name(npc::NpcKind::Humanoid)
|
||||||
))
|
))
|
||||||
.with_main_tool(assets::load_expect_cloned(
|
.with_main_tool(assets::load_expect_cloned(
|
||||||
match rng.gen_range(0, 5) {
|
match rng.gen_range(0, 1) {
|
||||||
0 => "common.items.weapons.sword.starter_sword",
|
//Add more possible cult leader weapons here
|
||||||
1 => "common.items.weapons.sword.short_sword_0",
|
_ => "common.items.weapons.sword.cultist_purp_2h-0",
|
||||||
2 => "common.items.weapons.sword.wood_sword",
|
|
||||||
3 => "common.items.weapons.sword.zweihander_sword_0",
|
|
||||||
_ => "common.items.weapons.hammer.hammer_1",
|
|
||||||
},
|
},
|
||||||
))
|
))
|
||||||
.with_loot_drop(match rng.gen_range(0, 3) {
|
.with_loot_drop(match rng.gen_range(0, 20) {
|
||||||
0 => comp::Item::expect_from_asset(
|
0 => comp::Item::expect_from_asset(
|
||||||
"common.items.boss_drops.lantern",
|
"common.items.boss_drops.lantern",
|
||||||
),
|
),
|
||||||
1 => comp::Item::expect_from_asset(
|
1 => comp::Item::expect_from_asset(
|
||||||
"common.items.boss_drops.potions",
|
"common.items.boss_drops.potions",
|
||||||
),
|
),
|
||||||
|
2 => comp::Item::expect_from_asset(
|
||||||
|
"common.items.armor.belt.cultist_belt",
|
||||||
|
),
|
||||||
|
3 => comp::Item::expect_from_asset(
|
||||||
|
"common.items.armor.chest.cultist_chest_purple",
|
||||||
|
),
|
||||||
|
4 => comp::Item::expect_from_asset(
|
||||||
|
"common.items.armor.foot.cultist_boots",
|
||||||
|
),
|
||||||
|
5 => comp::Item::expect_from_asset(
|
||||||
|
"common.items.armor.hand.cultist_hands_purple",
|
||||||
|
),
|
||||||
|
6 => comp::Item::expect_from_asset(
|
||||||
|
"common.items.armor.pants.cultist_legs_purple",
|
||||||
|
),
|
||||||
|
7 => comp::Item::expect_from_asset(
|
||||||
|
"common.items.armor.shoulder.cultist_shoulder_purple",
|
||||||
|
),
|
||||||
|
8 => comp::Item::expect_from_asset(
|
||||||
|
"common.items.weapons.sword.greatsword_2h_fine-0",
|
||||||
|
),
|
||||||
|
9 => comp::Item::expect_from_asset(
|
||||||
|
"common.items.weapons.sword.greatsword_2h_fine-1",
|
||||||
|
),
|
||||||
|
10 => comp::Item::expect_from_asset(
|
||||||
|
"common.items.weapons.sword.greatsword_2h_fine-2",
|
||||||
|
),
|
||||||
|
11 => comp::Item::expect_from_asset(
|
||||||
|
"common.items.weapons.sword.cultist_purp_2h-0",
|
||||||
|
),
|
||||||
_ => comp::Item::expect_from_asset(
|
_ => comp::Item::expect_from_asset(
|
||||||
"common.items.boss_drops.xp_potion",
|
"common.items.boss_drops.exp_flask",
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user