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,
|
||||
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,
|
||||
cause: Item,
|
||||
)),
|
||||
amount: 15,
|
||||
amount: 10,
|
||||
),
|
||||
)
|
||||
|
@ -7,5 +7,6 @@ Item(
|
||||
amount: 15,
|
||||
cause: Item,
|
||||
)),
|
||||
amount: 20,
|
||||
),
|
||||
)
|
||||
|
@ -7,5 +7,6 @@ Item(
|
||||
amount: 30,
|
||||
cause: Item,
|
||||
)),
|
||||
amount: 20,
|
||||
),
|
||||
)
|
||||
|
@ -4,4 +4,5 @@ Item(
|
||||
kind: Utility(
|
||||
kind: Collar,
|
||||
),
|
||||
amount: 1,
|
||||
)
|
||||
|
@ -7,5 +7,6 @@ Item(
|
||||
amount: 10,
|
||||
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,
|
||||
cause: Item,
|
||||
)),
|
||||
amount: 10,
|
||||
),
|
||||
)
|
||||
|
@ -5,4 +5,5 @@ Item(
|
||||
kind: Velorite,
|
||||
effect: Xp(20),
|
||||
),
|
||||
amount: 10,
|
||||
)
|
||||
|
@ -5,4 +5,5 @@ Item(
|
||||
kind: VeloriteFrag,
|
||||
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!"#,
|
||||
|
||||
"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
|
||||
"hud.bag.inventory": "{playername}s Inventar",
|
||||
"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.interact": "Interagieren",
|
||||
"gameinput.freelook": "Freie Sicht",
|
||||
"gameinput.dance": "Tanzen",
|
||||
|
||||
/// 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."#,
|
||||
|
||||
"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
|
||||
"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."#,
|
||||
|
||||
"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.help_window": "Fenêtre d'aide",
|
||||
"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."#,
|
||||
|
||||
"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.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."#,
|
||||
|
||||
"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.none": "Nenhum",
|
||||
"hud.settings.press_behavior.toggle": "Alternar",
|
||||
|
@ -179,6 +179,18 @@ https://account.veloren.net."#,
|
||||
|
||||
Наслаждайтесь миром 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
|
||||
"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!"#,
|
||||
|
||||
"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
|
||||
"hud.bag.inventory": "'in Envanteri",
|
||||
|
@ -178,6 +178,10 @@
|
||||
"voxel.weapon.sword.long_2h_fine-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
|
||||
Tool(Axe(BasicAxe)): VoxTrans(
|
||||
"voxel.weapon.axe.rusty_2h",
|
||||
@ -617,6 +621,10 @@
|
||||
"voxel.object.potion_red",
|
||||
(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(
|
||||
"element.icons.item_cheese",
|
||||
(0.0, 0.0, 0.0), (-90.0, 90.0, 0.0), 0.9,
|
||||
|
@ -63,51 +63,51 @@
|
||||
),
|
||||
Leather0: (
|
||||
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
|
||||
),
|
||||
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
|
||||
)
|
||||
),
|
||||
Leather1: (
|
||||
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
|
||||
),
|
||||
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
|
||||
)
|
||||
),
|
||||
ClothPurple0: (
|
||||
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
|
||||
),
|
||||
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
|
||||
)
|
||||
),
|
||||
ClothBlue0: (
|
||||
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
|
||||
),
|
||||
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
|
||||
)
|
||||
),
|
||||
ClothGreen0: (
|
||||
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
|
||||
),
|
||||
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
|
||||
)
|
||||
),
|
||||
|
@ -52,7 +52,7 @@
|
||||
color: None
|
||||
),
|
||||
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
|
||||
),
|
||||
Sword(GreatswordFine0): (
|
||||
@ -162,6 +162,10 @@
|
||||
Sword(LongFine5): (
|
||||
vox_spec: ("weapon.sword.long_2h_fine-5", (-2.0, -4.5, -6.0)),
|
||||
color: None
|
||||
),
|
||||
Sword(CultPurp0): (
|
||||
vox_spec: ("weapon.sword.cultist_purp_2h-0", (-2.0, -4.5, -7.5)),
|
||||
color: None
|
||||
),
|
||||
Axe(BasicAxe): (
|
||||
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,
|
||||
VeloriteFrag,
|
||||
PotionMinor,
|
||||
PotionExp,
|
||||
}
|
||||
|
||||
#[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::Chest => Some(assets::load_expect_cloned(
|
||||
[
|
||||
"common.items.apple",
|
||||
//miscellaneous
|
||||
"common.items.velorite",
|
||||
"common.items.veloritefrag",
|
||||
"common.items.cheese",
|
||||
"common.items.potion_minor",
|
||||
"common.items.collar",
|
||||
//swords
|
||||
"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.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.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.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",
|
||||
//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",
|
||||
//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",
|
||||
//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",
|
||||
//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",
|
||||
//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",
|
||||
//rings
|
||||
"common.items.armor.ring.ring_0",
|
||||
//capes
|
||||
"common.items.armor.back.short_0",
|
||||
//necks
|
||||
"common.items.armor.neck.neck_0",
|
||||
]
|
||||
.choose(&mut rand::thread_rng())
|
||||
|
@ -50,6 +50,7 @@ pub enum SwordKind {
|
||||
LongFine3,
|
||||
LongFine4,
|
||||
LongFine5,
|
||||
CultPurp0,
|
||||
}
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||
pub enum AxeKind {
|
||||
@ -137,6 +138,17 @@ impl Tool {
|
||||
use ToolKind::*;
|
||||
|
||||
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![
|
||||
TripleStrike {
|
||||
base_damage: 5,
|
||||
|
@ -299,7 +299,7 @@ impl Inventory {
|
||||
impl Default for Inventory {
|
||||
fn default() -> Inventory {
|
||||
let mut inventory = Inventory {
|
||||
slots: vec![None; 18],
|
||||
slots: vec![None; 36],
|
||||
amount: 0,
|
||||
};
|
||||
inventory.push(assets::load_expect_cloned("common.items.cheese"));
|
||||
|
@ -10,6 +10,7 @@ use common::{
|
||||
vol::{ReadVol, Vox},
|
||||
};
|
||||
use log::error;
|
||||
use rand::seq::SliceRandom;
|
||||
use specs::{join::Join, Entity as EcsEntity, WorldExt};
|
||||
use vek::Vec3;
|
||||
|
||||
@ -112,7 +113,179 @@ pub fn handle_destroy(server: &mut Server, entity: EcsEntity, cause: HealthSourc
|
||||
item_drops.remove(entity);
|
||||
item_drop.0
|
||||
} 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);
|
||||
|
@ -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>
|
||||
|
||||
quest_bg: "voxygen.element.misc_bg.temp_quest_bg",
|
||||
|
||||
// Buttons
|
||||
|
||||
settings: "voxygen.element.buttons.settings",
|
||||
|
@ -22,8 +22,6 @@ widget_ids! {
|
||||
mmap_button,
|
||||
mmap_plus,
|
||||
mmap_minus,
|
||||
zone_display_bg,
|
||||
zone_display,
|
||||
grid,
|
||||
indicator
|
||||
}
|
||||
|
@ -47,9 +47,8 @@ use crate::{
|
||||
use client::{Client, Event as ClientEvent};
|
||||
use common::{assets::load_expect, comp, terrain::TerrainChunk, vol::RectRasterableVol};
|
||||
use conrod_core::{
|
||||
position::Relative,
|
||||
text::cursor::Index,
|
||||
widget::{self, Button, Image, Rectangle, Text},
|
||||
widget::{self, Button, Image, Text},
|
||||
widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Widget,
|
||||
};
|
||||
use specs::{Join, WorldExt};
|
||||
@ -184,6 +183,14 @@ widget_ids! {
|
||||
// Free look indicator
|
||||
free_look_txt,
|
||||
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,
|
||||
new_messages: VecDeque<ClientEvent>,
|
||||
show: Show,
|
||||
never_show: bool,
|
||||
intro: bool,
|
||||
intro_2: bool,
|
||||
//never_show: bool,
|
||||
//intro: bool,
|
||||
//intro_2: bool,
|
||||
to_focus: Option<Option<widget::Id>>,
|
||||
force_ungrab: bool,
|
||||
force_chat_input: Option<String>,
|
||||
@ -495,8 +502,8 @@ impl Hud {
|
||||
fonts,
|
||||
ids,
|
||||
new_messages: VecDeque::new(),
|
||||
intro: false,
|
||||
intro_2: false,
|
||||
//intro: false,
|
||||
//intro_2: false,
|
||||
show: Show {
|
||||
help: false,
|
||||
intro: true,
|
||||
@ -517,7 +524,7 @@ impl Hud {
|
||||
free_look: false,
|
||||
},
|
||||
to_focus: None,
|
||||
never_show: false,
|
||||
//never_show: false,
|
||||
force_ungrab: false,
|
||||
force_chat_input: None,
|
||||
force_chat_cursor: None,
|
||||
@ -1100,146 +1107,68 @@ impl Hud {
|
||||
}
|
||||
}
|
||||
|
||||
// Introduction Text
|
||||
let intro_text = &self.voxygen_i18n.get("hud.welcome");
|
||||
if self.show.intro && !self.show.esc_menu && !self.intro_2 {
|
||||
// Temporary Example Quest
|
||||
if self.show.intro && !self.show.esc_menu {
|
||||
match global_state.settings.gameplay.intro_show {
|
||||
Intro::Show => {
|
||||
Rectangle::fill_with(
|
||||
[800.0 * 0.8, 850.0 * 0.8],
|
||||
Color::Rgba(0.0, 0.0, 0.0, 0.80),
|
||||
)
|
||||
.top_left_with_margins_on(ui_widgets.window, 180.0 * 0.8, 10.0 * 0.8)
|
||||
.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(16))
|
||||
.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(90.0, 35.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(16))
|
||||
.label_font_id(self.fonts.cyri.conrod_id)
|
||||
.label_color(TEXT_COLOR)
|
||||
.label_y(Relative::Scalar(4.0))
|
||||
.hover_image(self.imgs.button_hover)
|
||||
.press_image(self.imgs.button_press)
|
||||
.set(self.ids.intro_close, 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 {
|
||||
if self.pulse > 20.0 {
|
||||
self.show.want_grab = false;
|
||||
let quest_headline = &self.voxygen_i18n.get("hud.temp_quest_headline");
|
||||
let quest_text = &self.voxygen_i18n.get("hud.temp_quest_text");
|
||||
Image::new(self.imgs.quest_bg)
|
||||
.w_h(404.0, 858.0)
|
||||
.middle_of(ui_widgets.window)
|
||||
.set(self.ids.quest_bg, ui_widgets);
|
||||
|
||||
Text::new(quest_headline)
|
||||
.mid_top_with_margin_on(self.ids.quest_bg, 310.0)
|
||||
.font_size(self.fonts.cyri.scale(30))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.color(TEXT_BG)
|
||||
.set(self.ids.q_headline_bg, ui_widgets);
|
||||
Text::new(quest_headline)
|
||||
.bottom_left_with_margins_on(self.ids.q_headline_bg, 1.0, 1.0)
|
||||
.font_size(self.fonts.cyri.scale(30))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.color(TEXT_COLOR)
|
||||
.set(self.ids.q_headline, ui_widgets);
|
||||
|
||||
Text::new(quest_text)
|
||||
.down_from(self.ids.q_headline_bg, 40.0)
|
||||
.font_size(self.fonts.cyri.scale(17))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.color(TEXT_BG)
|
||||
.set(self.ids.q_text_bg, ui_widgets);
|
||||
Text::new(quest_text)
|
||||
.bottom_left_with_margins_on(self.ids.q_text_bg, 1.0, 1.0)
|
||||
.font_size(self.fonts.cyri.scale(17))
|
||||
.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.intro = false;
|
||||
self.intro_2 = false;
|
||||
events.push(Event::Intro(Intro::Never));
|
||||
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 => {},
|
||||
}
|
||||
}
|
||||
|
||||
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.
|
||||
if global_state.settings.gameplay.toggle_debug {
|
||||
// Alpha Version
|
||||
@ -1481,8 +1410,14 @@ impl Hud {
|
||||
}
|
||||
|
||||
// Popup
|
||||
Popup::new(&self.voxygen_i18n, client, &self.new_messages, &self.fonts)
|
||||
.set(self.ids.popup, ui_widgets);
|
||||
Popup::new(
|
||||
&self.voxygen_i18n,
|
||||
client,
|
||||
&self.new_messages,
|
||||
&self.fonts,
|
||||
&self.show,
|
||||
)
|
||||
.set(self.ids.popup, ui_widgets);
|
||||
|
||||
// MiniMap
|
||||
match MiniMap::new(
|
||||
@ -1569,6 +1504,7 @@ impl Hud {
|
||||
tooltip_manager,
|
||||
&mut self.slot_manager,
|
||||
&self.voxygen_i18n,
|
||||
&self.show,
|
||||
)
|
||||
.set(self.ids.skillbar, ui_widgets);
|
||||
}
|
||||
@ -1682,9 +1618,6 @@ impl Hud {
|
||||
settings_window::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) => {
|
||||
events.push(Event::AdjustMusicVolume(music_volume));
|
||||
},
|
||||
|
@ -1,3 +1,4 @@
|
||||
use super::Show;
|
||||
use crate::{i18n::VoxygenLocalization, ui::fonts::ConrodVoxygenFonts};
|
||||
use client::{self, Client, Event as ClientEvent};
|
||||
use common::msg::Notification;
|
||||
@ -26,6 +27,7 @@ pub struct Popup<'a> {
|
||||
fonts: &'a ConrodVoxygenFonts,
|
||||
#[conrod(common_builder)]
|
||||
common: widget::CommonBuilder,
|
||||
show: &'a Show,
|
||||
}
|
||||
|
||||
/// Popup notifications for messages such as <Chunk Name>, Waypoint Saved,
|
||||
@ -36,6 +38,7 @@ impl<'a> Popup<'a> {
|
||||
client: &'a Client,
|
||||
new_messages: &'a VecDeque<ClientEvent>,
|
||||
fonts: &'a ConrodVoxygenFonts,
|
||||
show: &'a Show,
|
||||
) -> Self {
|
||||
Self {
|
||||
voxygen_i18n,
|
||||
@ -43,6 +46,7 @@ impl<'a> Popup<'a> {
|
||||
new_messages,
|
||||
fonts,
|
||||
common: widget::CommonBuilder::default(),
|
||||
show,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -173,27 +177,30 @@ impl<'a> Widget for Popup<'a> {
|
||||
}
|
||||
|
||||
// Display info as popup
|
||||
if let Some(info) = state.infos.front() {
|
||||
let seconds = state.last_info_update.elapsed().as_secs_f32();
|
||||
let fade = if seconds < FADE_IN {
|
||||
seconds / FADE_IN
|
||||
} else if seconds < FADE_IN + FADE_HOLD {
|
||||
1.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))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.color(bg_color(fade))
|
||||
.set(state.ids.info_bg, ui);
|
||||
Text::new(info)
|
||||
.top_left_with_margins_on(state.ids.info_bg, -1.0, -1.0)
|
||||
.font_size(self.fonts.cyri.scale(20))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.color(info_color(fade))
|
||||
.set(state.ids.info_text, ui);
|
||||
if !self.show.intro {
|
||||
if let Some(info) = state.infos.front() {
|
||||
let seconds = state.last_info_update.elapsed().as_secs_f32();
|
||||
let fade = if seconds < FADE_IN {
|
||||
seconds / FADE_IN
|
||||
} else if seconds < FADE_IN + FADE_HOLD {
|
||||
1.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))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.color(bg_color(fade))
|
||||
.set(state.ids.info_bg, ui);
|
||||
Text::new(info)
|
||||
.top_left_with_margins_on(state.ids.info_bg, -1.0, -1.0)
|
||||
.font_size(self.fonts.cyri.scale(20))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.color(info_color(fade))
|
||||
.set(state.ids.info_text, ui);
|
||||
}
|
||||
}
|
||||
|
||||
// Get next message from queue
|
||||
@ -207,27 +214,29 @@ impl<'a> Widget for Popup<'a> {
|
||||
}
|
||||
|
||||
// Display message as popup
|
||||
if let Some(message) = state.messages.front() {
|
||||
let seconds = state.last_message_update.elapsed().as_secs_f32();
|
||||
let fade = if seconds < FADE_IN {
|
||||
seconds / FADE_IN
|
||||
} else if seconds < FADE_IN + FADE_HOLD {
|
||||
1.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)
|
||||
.font_size(self.fonts.alkhemi.scale(70))
|
||||
.font_id(self.fonts.alkhemi.conrod_id)
|
||||
.color(bg_color(fade))
|
||||
.set(state.ids.message_bg, ui);
|
||||
Text::new(message)
|
||||
.top_left_with_margins_on(state.ids.message_bg, -2.5, -2.5)
|
||||
.font_size(self.fonts.alkhemi.scale(70))
|
||||
.font_id(self.fonts.alkhemi.conrod_id)
|
||||
.color(message_color(fade))
|
||||
.set(state.ids.message_text, ui);
|
||||
if !self.show.intro {
|
||||
if let Some(message) = state.messages.front() {
|
||||
let seconds = state.last_message_update.elapsed().as_secs_f32();
|
||||
let fade = if seconds < FADE_IN {
|
||||
seconds / FADE_IN
|
||||
} else if seconds < FADE_IN + FADE_HOLD {
|
||||
1.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)
|
||||
.font_size(self.fonts.alkhemi.scale(70))
|
||||
.font_id(self.fonts.alkhemi.conrod_id)
|
||||
.color(bg_color(fade))
|
||||
.set(state.ids.message_bg, ui);
|
||||
Text::new(message)
|
||||
.top_left_with_margins_on(state.ids.message_bg, -2.5, -2.5)
|
||||
.font_size(self.fonts.alkhemi.scale(70))
|
||||
.font_id(self.fonts.alkhemi.conrod_id)
|
||||
.color(message_color(fade))
|
||||
.set(state.ids.message_text, ui);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
use super::{
|
||||
img_ids::Imgs, BarNumbers, CrosshairType, Intro, PressBehavior, ShortcutNumbers, Show, XpBar,
|
||||
MENU_BG, TEXT_COLOR,
|
||||
img_ids::Imgs, BarNumbers, CrosshairType, PressBehavior, ShortcutNumbers, Show, XpBar, MENU_BG,
|
||||
TEXT_COLOR,
|
||||
};
|
||||
use crate::{
|
||||
i18n::{list_localizations, LanguageMetadata, VoxygenLocalization},
|
||||
@ -210,7 +210,6 @@ pub enum Event {
|
||||
ToggleShortcutNumbers(ShortcutNumbers),
|
||||
ChangeTab(SettingsTab),
|
||||
Close,
|
||||
Intro(Intro),
|
||||
AdjustMousePan(u32),
|
||||
AdjustMouseZoom(u32),
|
||||
ToggleZoomInvert(bool),
|
||||
@ -407,37 +406,10 @@ impl<'a> Widget for SettingsWindow<'a> {
|
||||
.graphics_for(state.ids.debug_button)
|
||||
.color(TEXT_COLOR)
|
||||
.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
|
||||
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_id(self.fonts.cyri.conrod_id)
|
||||
.color(TEXT_COLOR)
|
||||
|
@ -2,8 +2,8 @@ use super::{
|
||||
hotbar,
|
||||
img_ids::{Imgs, ImgsRot},
|
||||
item_imgs::ItemImgs,
|
||||
slots, BarNumbers, ShortcutNumbers, XpBar, BLACK, CRITICAL_HP_COLOR, HP_COLOR, LOW_HP_COLOR,
|
||||
MANA_COLOR, TEXT_COLOR, XP_COLOR,
|
||||
slots, BarNumbers, ShortcutNumbers, Show, XpBar, BLACK, CRITICAL_HP_COLOR, HP_COLOR,
|
||||
LOW_HP_COLOR, MANA_COLOR, TEXT_COLOR, XP_COLOR,
|
||||
};
|
||||
use crate::{
|
||||
i18n::VoxygenLocalization,
|
||||
@ -135,6 +135,7 @@ pub struct Skillbar<'a> {
|
||||
#[conrod(common_builder)]
|
||||
common: widget::CommonBuilder,
|
||||
current_resource: ResourceType,
|
||||
show: &'a Show,
|
||||
}
|
||||
|
||||
impl<'a> Skillbar<'a> {
|
||||
@ -155,6 +156,7 @@ impl<'a> Skillbar<'a> {
|
||||
tooltip_manager: &'a mut TooltipManager,
|
||||
slot_manager: &'a mut slots::SlotManager,
|
||||
localized_strings: &'a std::sync::Arc<VoxygenLocalization>,
|
||||
show: &'a Show,
|
||||
) -> Self {
|
||||
Self {
|
||||
global_state,
|
||||
@ -175,6 +177,7 @@ impl<'a> Skillbar<'a> {
|
||||
tooltip_manager,
|
||||
slot_manager,
|
||||
localized_strings,
|
||||
show,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -230,63 +233,64 @@ impl<'a> Widget for Skillbar<'a> {
|
||||
let localized_strings = self.localized_strings;
|
||||
|
||||
// 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();
|
||||
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 seconds_level = state.last_update_level.elapsed().as_secs_f32();
|
||||
let fade_level = if current_level == 1 {
|
||||
0.0
|
||||
} else if seconds_level < FADE_IN_LVL {
|
||||
seconds_level / FADE_IN_LVL
|
||||
} else if seconds_level < FADE_IN_LVL + FADE_HOLD_LVL {
|
||||
1.0
|
||||
} else {
|
||||
(1.0 - (seconds_level - FADE_IN_LVL - FADE_HOLD_LVL) / FADE_OUT_LVL).max(0.0)
|
||||
};
|
||||
// Contents
|
||||
Rectangle::fill_with([82.0 * 4.0, 40.0 * 4.0], color::TRANSPARENT)
|
||||
.mid_top_with_margin_on(ui.window, 300.0)
|
||||
.set(state.ids.level_align, ui);
|
||||
let level_up_text = &localized_strings
|
||||
.get("char_selection.level_fmt")
|
||||
.replace("{level_nb}", &self.stats.level.level().to_string());
|
||||
Text::new(&level_up_text)
|
||||
.middle_of(state.ids.level_align)
|
||||
.font_size(self.fonts.cyri.scale(30))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.color(Color::Rgba(0.0, 0.0, 0.0, fade_level))
|
||||
.set(state.ids.level_message_bg, ui);
|
||||
Text::new(&level_up_text)
|
||||
.bottom_left_with_margins_on(state.ids.level_message_bg, 2.0, 2.0)
|
||||
.font_size(self.fonts.cyri.scale(30))
|
||||
.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);
|
||||
let seconds_level = state.last_update_level.elapsed().as_secs_f32();
|
||||
let fade_level = if current_level == 1 {
|
||||
0.0
|
||||
} else if seconds_level < FADE_IN_LVL {
|
||||
seconds_level / FADE_IN_LVL
|
||||
} else if seconds_level < FADE_IN_LVL + FADE_HOLD_LVL {
|
||||
1.0
|
||||
} else {
|
||||
(1.0 - (seconds_level - FADE_IN_LVL - FADE_HOLD_LVL) / FADE_OUT_LVL).max(0.0)
|
||||
};
|
||||
// Contents
|
||||
Rectangle::fill_with([82.0 * 4.0, 40.0 * 4.0], color::TRANSPARENT)
|
||||
.mid_top_with_margin_on(ui.window, 300.0)
|
||||
.set(state.ids.level_align, ui);
|
||||
let level_up_text = &localized_strings
|
||||
.get("char_selection.level_fmt")
|
||||
.replace("{level_nb}", &self.stats.level.level().to_string());
|
||||
Text::new(&level_up_text)
|
||||
.middle_of(state.ids.level_align)
|
||||
.font_size(self.fonts.cyri.scale(30))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.color(Color::Rgba(0.0, 0.0, 0.0, fade_level))
|
||||
.set(state.ids.level_message_bg, ui);
|
||||
Text::new(&level_up_text)
|
||||
.bottom_left_with_margins_on(state.ids.level_message_bg, 2.0, 2.0)
|
||||
.font_size(self.fonts.cyri.scale(30))
|
||||
.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
|
||||
if self.stats.is_dead {
|
||||
if let Some(key) = self
|
||||
|
@ -486,23 +486,50 @@ impl Floor {
|
||||
npc::get_npc_name(npc::NpcKind::Humanoid)
|
||||
))
|
||||
.with_main_tool(assets::load_expect_cloned(
|
||||
match rng.gen_range(0, 5) {
|
||||
0 => "common.items.weapons.sword.starter_sword",
|
||||
1 => "common.items.weapons.sword.short_sword_0",
|
||||
2 => "common.items.weapons.sword.wood_sword",
|
||||
3 => "common.items.weapons.sword.zweihander_sword_0",
|
||||
_ => "common.items.weapons.hammer.hammer_1",
|
||||
match rng.gen_range(0, 1) {
|
||||
//Add more possible cult leader weapons here
|
||||
_ => "common.items.weapons.sword.cultist_purp_2h-0",
|
||||
},
|
||||
))
|
||||
.with_loot_drop(match rng.gen_range(0, 3) {
|
||||
.with_loot_drop(match rng.gen_range(0, 20) {
|
||||
0 => comp::Item::expect_from_asset(
|
||||
"common.items.boss_drops.lantern",
|
||||
),
|
||||
1 => comp::Item::expect_from_asset(
|
||||
"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(
|
||||
"common.items.boss_drops.xp_potion",
|
||||
"common.items.boss_drops.exp_flask",
|
||||
),
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user