mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Add shield item
This commit is contained in:
parent
4195273cf9
commit
1279f70184
10
assets/common/items/weapons/shield_1.ron
Normal file
10
assets/common/items/weapons/shield_1.ron
Normal file
@ -0,0 +1,10 @@
|
||||
Item(
|
||||
name: "A Shield",
|
||||
description: "Legends tell this item is useless.",
|
||||
kind: Tool (
|
||||
ToolData (
|
||||
kind: Shield,
|
||||
equip_time_millis: 400,
|
||||
)
|
||||
),
|
||||
)
|
@ -29,7 +29,7 @@
|
||||
),
|
||||
Tool(Shield): VoxTrans(
|
||||
"voxel.weapon.shield.wood-0",
|
||||
(0.0, 9.0, 0.0), (-90.0, 90.0, 0.0), 2.4,
|
||||
(0.0, 0.0, 0.0), (-90.0, 90.0, 0.0), 2.4,
|
||||
),
|
||||
Utility(Collar): VoxTrans(
|
||||
"element.icons.collar",
|
||||
|
@ -83,7 +83,7 @@ impl ToolData {
|
||||
recover_duration: Duration::from_millis(300),
|
||||
base_damage: 70,
|
||||
}],
|
||||
Shield => vec![],
|
||||
Shield => vec![BasicBlock],
|
||||
Debug(kind) => match kind {
|
||||
DebugKind::Boost => vec![
|
||||
CharacterAbility::Boost {
|
||||
|
@ -25,7 +25,9 @@ impl CharacterBehavior for Data {
|
||||
|
||||
handle_move(&data, &mut update);
|
||||
|
||||
if !data.physics.on_ground || !data.inputs.secondary.is_pressed() {
|
||||
if !data.physics.on_ground
|
||||
|| !(data.inputs.secondary.is_pressed() || data.inputs.primary.is_pressed())
|
||||
{
|
||||
attempt_wield(data, &mut update);
|
||||
}
|
||||
update
|
||||
|
@ -632,7 +632,7 @@ pub fn mesh_main(item_kind: Option<&ItemKind>) -> Mesh<FigurePipeline> {
|
||||
ToolKind::Axe => ("weapon.axe.rusty_2h", Vec3::new(-1.5, -5.0, -4.0)),
|
||||
ToolKind::Hammer => ("weapon.hammer.rusty_2h", Vec3::new(-2.5, -5.5, -4.0)),
|
||||
ToolKind::Dagger => ("weapon.hammer.rusty_2h", Vec3::new(-2.5, -5.5, -4.0)),
|
||||
ToolKind::Shield => ("weapon.axe.rusty_2h", Vec3::new(-2.5, -6.5, -2.0)),
|
||||
ToolKind::Shield => ("weapon.shield.wood-0", Vec3::new(-2.5, -6.5, -2.0)),
|
||||
ToolKind::Bow => ("weapon.bow.simple-bow", Vec3::new(-1.0, -6.0, -2.0)),
|
||||
ToolKind::Staff => ("weapon.staff.wood-fire", Vec3::new(-1.0, -6.0, -3.0)),
|
||||
ToolKind::Debug(_) => ("weapon.debug_wand", Vec3::new(-1.5, -9.5, -4.0)),
|
||||
|
Loading…
Reference in New Issue
Block a user