mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Add handles to lanterns, fix cooking pot scale
This commit is contained in:
parent
8d664ded1a
commit
b69eb61e7b
@ -3,12 +3,12 @@ ItemDef(
|
|||||||
description: "Illuminates even the darkest dungeon\nA great monster was slain for this item",
|
description: "Illuminates even the darkest dungeon\nA great monster was slain for this item",
|
||||||
kind: Lantern(
|
kind: Lantern(
|
||||||
(
|
(
|
||||||
kind: "Blue0",
|
kind: "Green0",
|
||||||
color: (r: 128, g: 26, b: 255),
|
color: (r: 128, g: 26, b: 255),
|
||||||
strength_thousandths: 8500,
|
strength_thousandths: 8500,
|
||||||
flicker_thousandths: 300,
|
flicker_thousandths: 300,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
quality: High,
|
quality: Epic,
|
||||||
tags: [Utility],
|
tags: [Utility],
|
||||||
)
|
)
|
||||||
|
BIN
assets/voxygen/voxel/armor/misc/lantern/black-0.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/armor/misc/lantern/black-0.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/armor/misc/lantern/blue-0.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/armor/misc/lantern/blue-0.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/armor/misc/lantern/green-0.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/armor/misc/lantern/green-0.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/armor/misc/lantern/red-0.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/armor/misc/lantern/red-0.vox
(Stored with Git LFS)
Binary file not shown.
@ -5,23 +5,23 @@
|
|||||||
),
|
),
|
||||||
map: {
|
map: {
|
||||||
"Green0": (
|
"Green0": (
|
||||||
vox_spec: ("armor.misc.lantern.green-0", (-2.0, -2.0, -7.0)),
|
vox_spec: ("lantern.green-0", (-2.0, -2.0, -7.0)),
|
||||||
color: None
|
color: None
|
||||||
),
|
),
|
||||||
"Black0": (
|
"Black0": (
|
||||||
vox_spec: ("armor.misc.lantern.black-0", (-2.0, -2.0, -7.0)),
|
vox_spec: ("lantern.black-0", (-2.0, -2.0, -8.5)),
|
||||||
color: None
|
color: None
|
||||||
),
|
),
|
||||||
"Red0": (
|
"Red0": (
|
||||||
vox_spec: ("armor.misc.lantern.red-0", (-2.0, -2.0, -7.0)),
|
vox_spec: ("lantern.red-0", (-2.0, -2.0, -7.0)),
|
||||||
color: None
|
color: None
|
||||||
),
|
),
|
||||||
"Blue0": (
|
"Blue0": (
|
||||||
vox_spec: ("armor.misc.lantern.blue-0", (-2.0, -2.0, -7.0)),
|
vox_spec: ("lantern.blue-0", (-2.0, -2.0, -7.0)),
|
||||||
color: None
|
color: None
|
||||||
),
|
),
|
||||||
"GeodePurp": (
|
"GeodePurp": (
|
||||||
vox_spec: ("lantern.geode_purp", (-3.0, -3.0, -7.0)),
|
vox_spec: ("lantern.geode_purp", (-2.5, -2.5, -9.5)),
|
||||||
color: None
|
color: None
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
BIN
assets/voxygen/voxel/lantern/black-0.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/lantern/black-0.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/lantern/blue-0.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/lantern/blue-0.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/lantern/geode_purp.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/lantern/geode_purp.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/lantern/green-0.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/lantern/green-0.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/lantern/red-0.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/lantern/red-0.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/sprite/cooking_pot/pot-0.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/sprite/cooking_pot/pot-0.vox
(Stored with Git LFS)
Binary file not shown.
@ -175,6 +175,7 @@ impl CharacterState {
|
|||||||
| CharacterState::Dance
|
| CharacterState::Dance
|
||||||
| CharacterState::Glide
|
| CharacterState::Glide
|
||||||
| CharacterState::GlideWield
|
| CharacterState::GlideWield
|
||||||
|
| CharacterState::Talk
|
||||||
| CharacterState::Roll(_),
|
| CharacterState::Roll(_),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -290,6 +290,14 @@ impl Animation for AlphaAnimation {
|
|||||||
next.second = next.main;
|
next.second = next.main;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if skeleton.holding_lantern {
|
||||||
|
next.hand_r.position = Vec3::new(s_a.hand.0, s_a.hand.1 + 5.0, s_a.hand.2 + 12.0);
|
||||||
|
next.hand_r.orientation = Quaternion::rotation_x(2.25) * Quaternion::rotation_z(0.9);
|
||||||
|
|
||||||
|
next.lantern.position = Vec3::new(-0.5, -0.5, -1.5);
|
||||||
|
next.lantern.orientation = next.hand_r.orientation.inverse();
|
||||||
|
}
|
||||||
|
|
||||||
next
|
next
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -196,7 +196,7 @@ impl Animation for JumpAnimation {
|
|||||||
next.hand_r.position = Vec3::new(s_a.hand.0, s_a.hand.1 + 5.0, s_a.hand.2 + 9.0);
|
next.hand_r.position = Vec3::new(s_a.hand.0, s_a.hand.1 + 5.0, s_a.hand.2 + 9.0);
|
||||||
next.hand_r.orientation = Quaternion::rotation_x(2.25) * Quaternion::rotation_z(0.9);
|
next.hand_r.orientation = Quaternion::rotation_x(2.25) * Quaternion::rotation_z(0.9);
|
||||||
|
|
||||||
next.lantern.position = Vec3::new(0.0, 0.0, -3.5);
|
next.lantern.position = Vec3::new(-0.5, -0.5, -2.5);
|
||||||
next.lantern.orientation = next.hand_r.orientation.inverse()
|
next.lantern.orientation = next.hand_r.orientation.inverse()
|
||||||
* Quaternion::rotation_x(slow * 0.5)
|
* Quaternion::rotation_x(slow * 0.5)
|
||||||
* Quaternion::rotation_y(tilt * 4.0 * slow + tilt * 3.0);
|
* Quaternion::rotation_y(tilt * 4.0 * slow + tilt * 3.0);
|
||||||
|
@ -132,7 +132,7 @@ impl Skeleton for CharacterSkeleton {
|
|||||||
// FIXME: Should this be control_l_mat?
|
// FIXME: Should this be control_l_mat?
|
||||||
make_bone(control_mat * hand_l_mat * Mat4::<f32>::from(self.hold)),
|
make_bone(control_mat * hand_l_mat * Mat4::<f32>::from(self.hold)),
|
||||||
];
|
];
|
||||||
(lantern_mat * Vec4::new(-0.0, -0.0, -1.5, 1.0)).xyz()
|
(lantern_mat * Vec4::new(0.0, 0.0, -4.0, 1.0)).xyz()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -258,16 +258,19 @@ impl Animation for RunAnimation {
|
|||||||
|
|
||||||
if skeleton.holding_lantern {
|
if skeleton.holding_lantern {
|
||||||
next.hand_r.position = Vec3::new(
|
next.hand_r.position = Vec3::new(
|
||||||
s_a.hand.0,
|
s_a.hand.0 + 1.0,
|
||||||
s_a.hand.1 + 5.0 - impact * 0.2,
|
s_a.hand.1 + 2.0 - impact * 0.2,
|
||||||
s_a.hand.2 + 11.0 + impact * -0.1,
|
s_a.hand.2 + 12.0 + impact * -0.1,
|
||||||
);
|
);
|
||||||
next.hand_r.orientation = Quaternion::rotation_x(2.25) * Quaternion::rotation_z(0.9);
|
next.hand_r.orientation = Quaternion::rotation_x(2.25) * Quaternion::rotation_z(0.9);
|
||||||
|
|
||||||
next.lantern.position = Vec3::new(0.0, 0.0, -2.5);
|
let fast = (anim_time * 8.0).sin();
|
||||||
|
let fast2 = (anim_time * 6.0 + 8.0).sin();
|
||||||
|
|
||||||
|
next.lantern.position = Vec3::new(-0.5, -0.5, -2.5);
|
||||||
next.lantern.orientation = next.hand_r.orientation.inverse()
|
next.lantern.orientation = next.hand_r.orientation.inverse()
|
||||||
* Quaternion::rotation_x((foothorir + 0.5) * 1.0 * speednorm)
|
* Quaternion::rotation_x((fast + 0.5) * 1.0 * speednorm)
|
||||||
* Quaternion::rotation_y(tilt * 4.0 * foothorir + tilt * 3.0);
|
* Quaternion::rotation_y(tilt * 4.0 * fast + tilt * 3.0 + fast2 * speednorm * 0.25);
|
||||||
}
|
}
|
||||||
|
|
||||||
next.torso.position = Vec3::new(0.0, 0.0, 0.0) * s_a.scaler;
|
next.torso.position = Vec3::new(0.0, 0.0, 0.0) * s_a.scaler;
|
||||||
|
@ -89,17 +89,22 @@ impl Animation for SitAnimation {
|
|||||||
|
|
||||||
if skeleton.holding_lantern {
|
if skeleton.holding_lantern {
|
||||||
next.hand_r.position = Vec3::new(
|
next.hand_r.position = Vec3::new(
|
||||||
s_a.hand.0 - head_look.x * 10.0,
|
s_a.hand.0 + 1.0 - head_look.x * 8.0,
|
||||||
s_a.hand.1 + 5.0 + head_look.y * 12.0,
|
s_a.hand.1 + 5.0 + head_look.x * 6.0,
|
||||||
s_a.hand.2 + 9.0 - head_look.y * 12.0,
|
s_a.hand.2 + 9.0 + head_look.y * 6.0,
|
||||||
);
|
);
|
||||||
next.hand_r.orientation = Quaternion::rotation_x(2.25)
|
next.hand_r.orientation = Quaternion::rotation_x(2.25)
|
||||||
* Quaternion::rotation_z(0.9)
|
* Quaternion::rotation_z(0.9)
|
||||||
* Quaternion::rotation_y(head_look.x * 3.0)
|
* Quaternion::rotation_y(head_look.x * 3.0)
|
||||||
* Quaternion::rotation_x(head_look.y * 3.0);
|
* Quaternion::rotation_x(head_look.y * 3.0);
|
||||||
|
|
||||||
next.lantern.position = Vec3::new(0.0, 0.0, -3.5);
|
let fast = (anim_time * 5.0).sin();
|
||||||
next.lantern.orientation = next.hand_r.orientation.inverse();
|
let fast2 = (anim_time * 4.5 + 8.0).sin();
|
||||||
|
|
||||||
|
next.lantern.position = Vec3::new(-0.5, -0.5, -2.5);
|
||||||
|
next.lantern.orientation = next.hand_r.orientation.inverse()
|
||||||
|
* Quaternion::rotation_x(fast * 0.1)
|
||||||
|
* Quaternion::rotation_y(fast2 * 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
next
|
next
|
||||||
|
@ -32,7 +32,6 @@ impl Animation for StandAnimation {
|
|||||||
let mut next = (*skeleton).clone();
|
let mut next = (*skeleton).clone();
|
||||||
|
|
||||||
let slow = (anim_time * 1.0).sin();
|
let slow = (anim_time * 1.0).sin();
|
||||||
let fast = (anim_time * 5.0).sin();
|
|
||||||
let impact = (avg_vel.z).max(-15.0);
|
let impact = (avg_vel.z).max(-15.0);
|
||||||
let head_look = Vec2::new(
|
let head_look = Vec2::new(
|
||||||
((global_time + anim_time) / 10.0).floor().mul(7331.0).sin() * 0.15,
|
((global_time + anim_time) / 10.0).floor().mul(7331.0).sin() * 0.15,
|
||||||
@ -147,16 +146,20 @@ impl Animation for StandAnimation {
|
|||||||
next.hand_r.position = Vec3::new(
|
next.hand_r.position = Vec3::new(
|
||||||
s_a.hand.0 - head_look.x * 10.0,
|
s_a.hand.0 - head_look.x * 10.0,
|
||||||
s_a.hand.1 + 5.0 - head_look.y * 8.0 + slow * 0.15 - impact * 0.2,
|
s_a.hand.1 + 5.0 - head_look.y * 8.0 + slow * 0.15 - impact * 0.2,
|
||||||
s_a.hand.2 + 11.0 + slow * 0.5 + impact * -0.1,
|
s_a.hand.2 + 12.0 + slow * 0.5 + impact * -0.1,
|
||||||
);
|
);
|
||||||
next.hand_r.orientation = Quaternion::rotation_x(2.5 + slow * -0.06 + impact * -0.1)
|
next.hand_r.orientation = Quaternion::rotation_x(2.5 + slow * -0.06 + impact * -0.1)
|
||||||
* Quaternion::rotation_z(0.9)
|
* Quaternion::rotation_z(0.9)
|
||||||
* Quaternion::rotation_y(head_look.x * 3.0)
|
* Quaternion::rotation_y(head_look.x * 1.5)
|
||||||
* Quaternion::rotation_x(head_look.y * 3.0);
|
* Quaternion::rotation_x(head_look.y * 1.5);
|
||||||
|
|
||||||
next.lantern.position = Vec3::new(0.0, 0.0, -3.5);
|
let fast = (anim_time * 5.0).sin();
|
||||||
next.lantern.orientation =
|
let fast2 = (anim_time * 4.5 + 8.0).sin();
|
||||||
next.hand_r.orientation.inverse() * Quaternion::rotation_x(fast * 0.1);
|
|
||||||
|
next.lantern.position = Vec3::new(-0.5, -0.5, -2.5);
|
||||||
|
next.lantern.orientation = next.hand_r.orientation.inverse()
|
||||||
|
* Quaternion::rotation_x(fast * 0.1)
|
||||||
|
* Quaternion::rotation_y(fast2 * 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
next.torso.position = Vec3::new(0.0, 0.0, 0.0) * s_a.scaler;
|
next.torso.position = Vec3::new(0.0, 0.0, 0.0) * s_a.scaler;
|
||||||
|
@ -341,17 +341,24 @@ impl Animation for WieldAnimation {
|
|||||||
|
|
||||||
if skeleton.holding_lantern {
|
if skeleton.holding_lantern {
|
||||||
next.hand_r.position = Vec3::new(
|
next.hand_r.position = Vec3::new(
|
||||||
s_a.hand.0 - head_look.x * 10.0,
|
s_a.hand.0 - head_look.x * 6.0,
|
||||||
s_a.hand.1 + 5.0 + slow * 0.15,
|
s_a.hand.1 + 5.0 - head_look.y * 10.0 + slow * 0.15,
|
||||||
s_a.hand.2 + 9.0 + head_look.y * 18.0 + slow * 0.5,
|
s_a.hand.2 + 12.0 + head_look.y * 6.0 + slow * 0.5,
|
||||||
);
|
);
|
||||||
next.hand_r.orientation = Quaternion::rotation_x(2.25 + slow * -0.06)
|
next.hand_r.orientation = Quaternion::rotation_x(2.25 + slow * -0.06)
|
||||||
* Quaternion::rotation_z(0.9)
|
* Quaternion::rotation_z(0.9)
|
||||||
* Quaternion::rotation_y(head_look.x * 3.0)
|
* Quaternion::rotation_y(head_look.x * 1.5)
|
||||||
* Quaternion::rotation_x(head_look.y * 3.0);
|
* Quaternion::rotation_x(head_look.y * 1.5);
|
||||||
|
|
||||||
next.lantern.position = Vec3::new(0.0, 0.0, -3.5);
|
let fast = (anim_time * 8.0).sin();
|
||||||
next.lantern.orientation = next.hand_r.orientation.inverse();
|
let fast2 = (anim_time * 6.0 + 8.0).sin();
|
||||||
|
|
||||||
|
next.lantern.position = Vec3::new(-0.5, -0.5, -2.5);
|
||||||
|
next.lantern.orientation = next.hand_r.orientation.inverse()
|
||||||
|
* Quaternion::rotation_x((fast + 0.5) * 1.0 * speednorm + fast * 0.1)
|
||||||
|
* Quaternion::rotation_y(
|
||||||
|
tilt * 1.0 * fast + tilt * 1.0 + fast2 * speednorm * 0.25 + fast2 * 0.1,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
next
|
next
|
||||||
|
@ -28,7 +28,7 @@ use anim::{
|
|||||||
use common::{
|
use common::{
|
||||||
comp::{
|
comp::{
|
||||||
inventory::slot::EquipSlot,
|
inventory::slot::EquipSlot,
|
||||||
item::{ItemKind, ToolKind},
|
item::{Hands, ItemKind, ToolKind},
|
||||||
Body, CharacterState, Controller, Health, Inventory, Item, Last, LightAnimation,
|
Body, CharacterState, Controller, Health, Inventory, Item, Last, LightAnimation,
|
||||||
LightEmitter, Ori, PhysicsState, PoiseState, Pos, Scale, Vel,
|
LightEmitter, Ori, PhysicsState, PoiseState, Pos, Scale, Vel,
|
||||||
},
|
},
|
||||||
@ -765,7 +765,8 @@ impl FigureMgr {
|
|||||||
let holding_lantern = inventory
|
let holding_lantern = inventory
|
||||||
.map_or(false, |i| i.equipped(EquipSlot::Lantern).is_some())
|
.map_or(false, |i| i.equipped(EquipSlot::Lantern).is_some())
|
||||||
&& light_emitter.is_some()
|
&& light_emitter.is_some()
|
||||||
&& !(matches!(second_tool_hand, Some(_))
|
&& !((matches!(second_tool_hand, Some(_))
|
||||||
|
|| matches!(active_tool_hand, Some(Hands::Two)))
|
||||||
&& character.map_or(false, |c| c.is_wield()))
|
&& character.map_or(false, |c| c.is_wield()))
|
||||||
&& !character.map_or(false, |c| c.is_using_hands())
|
&& !character.map_or(false, |c| c.is_using_hands())
|
||||||
&& physics.in_liquid().is_none();
|
&& physics.in_liquid().is_none();
|
||||||
|
Loading…
Reference in New Issue
Block a user