diff --git a/assets/common/items/weapons/shield_1.ron b/assets/common/items/weapons/shield_1.ron new file mode 100644 index 0000000000..23dd6b0ddb --- /dev/null +++ b/assets/common/items/weapons/shield_1.ron @@ -0,0 +1,10 @@ +Item( + name: "A Shield", + description: "Legends tell this item is useless.", + kind: Tool ( + ToolData ( + kind: Shield, + equip_time_millis: 400, + ) + ), +) diff --git a/assets/voxygen/item_image_manifest.ron b/assets/voxygen/item_image_manifest.ron index 3d8d53ce24..1705c5119c 100644 --- a/assets/voxygen/item_image_manifest.ron +++ b/assets/voxygen/item_image_manifest.ron @@ -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", diff --git a/common/src/comp/inventory/item.rs b/common/src/comp/inventory/item.rs index 7777bde801..fcad410845 100644 --- a/common/src/comp/inventory/item.rs +++ b/common/src/comp/inventory/item.rs @@ -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 { diff --git a/common/src/states/basic_block.rs b/common/src/states/basic_block.rs index e238a488b5..7b95b934be 100644 --- a/common/src/states/basic_block.rs +++ b/common/src/states/basic_block.rs @@ -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 diff --git a/voxygen/src/scene/figure/load.rs b/voxygen/src/scene/figure/load.rs index 94d98807d9..158b389bb4 100644 --- a/voxygen/src/scene/figure/load.rs +++ b/voxygen/src/scene/figure/load.rs @@ -632,7 +632,7 @@ pub fn mesh_main(item_kind: Option<&ItemKind>) -> Mesh { 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)),