Add handles to lanterns, fix cooking pot scale

This commit is contained in:
Monty Marz 2021-04-22 17:12:07 +00:00 committed by Marcel
parent 8d664ded1a
commit b69eb61e7b
21 changed files with 78 additions and 56 deletions

View File

@ -3,12 +3,12 @@ ItemDef(
description: "Illuminates even the darkest dungeon\nA great monster was slain for this item",
kind: Lantern(
(
kind: "Blue0",
kind: "Green0",
color: (r: 128, g: 26, b: 255),
strength_thousandths: 8500,
flicker_thousandths: 300,
),
),
quality: High,
quality: Epic,
tags: [Utility],
)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -5,23 +5,23 @@
),
map: {
"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
),
"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
),
"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
),
"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
),
"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
),
},

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

Binary file not shown.

Binary file not shown.

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

Binary file not shown.

Binary file not shown.

View File

@ -175,6 +175,7 @@ impl CharacterState {
| CharacterState::Dance
| CharacterState::Glide
| CharacterState::GlideWield
| CharacterState::Talk
| CharacterState::Roll(_),
)
}

View File

@ -290,6 +290,14 @@ impl Animation for AlphaAnimation {
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
}
}

View File

@ -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.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()
* Quaternion::rotation_x(slow * 0.5)
* Quaternion::rotation_y(tilt * 4.0 * slow + tilt * 3.0);

View File

@ -132,7 +132,7 @@ impl Skeleton for CharacterSkeleton {
// FIXME: Should this be control_l_mat?
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()
}
}

View File

@ -258,16 +258,19 @@ impl Animation for RunAnimation {
if skeleton.holding_lantern {
next.hand_r.position = Vec3::new(
s_a.hand.0,
s_a.hand.1 + 5.0 - impact * 0.2,
s_a.hand.2 + 11.0 + impact * -0.1,
s_a.hand.0 + 1.0,
s_a.hand.1 + 2.0 - impact * 0.2,
s_a.hand.2 + 12.0 + impact * -0.1,
);
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()
* Quaternion::rotation_x((foothorir + 0.5) * 1.0 * speednorm)
* Quaternion::rotation_y(tilt * 4.0 * foothorir + tilt * 3.0);
* Quaternion::rotation_x((fast + 0.5) * 1.0 * speednorm)
* 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;

View File

@ -89,17 +89,22 @@ impl Animation for SitAnimation {
if skeleton.holding_lantern {
next.hand_r.position = Vec3::new(
s_a.hand.0 - head_look.x * 10.0,
s_a.hand.1 + 5.0 + head_look.y * 12.0,
s_a.hand.2 + 9.0 - head_look.y * 12.0,
s_a.hand.0 + 1.0 - head_look.x * 8.0,
s_a.hand.1 + 5.0 + head_look.x * 6.0,
s_a.hand.2 + 9.0 + head_look.y * 6.0,
);
next.hand_r.orientation = Quaternion::rotation_x(2.25)
* Quaternion::rotation_z(0.9)
* Quaternion::rotation_y(head_look.x * 3.0)
* Quaternion::rotation_x(head_look.y * 3.0);
next.lantern.position = Vec3::new(0.0, 0.0, -3.5);
next.lantern.orientation = next.hand_r.orientation.inverse();
let fast = (anim_time * 5.0).sin();
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

View File

@ -32,7 +32,6 @@ impl Animation for StandAnimation {
let mut next = (*skeleton).clone();
let slow = (anim_time * 1.0).sin();
let fast = (anim_time * 5.0).sin();
let impact = (avg_vel.z).max(-15.0);
let head_look = Vec2::new(
((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(
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.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)
* Quaternion::rotation_z(0.9)
* Quaternion::rotation_y(head_look.x * 3.0)
* Quaternion::rotation_x(head_look.y * 3.0);
* Quaternion::rotation_y(head_look.x * 1.5)
* Quaternion::rotation_x(head_look.y * 1.5);
next.lantern.position = Vec3::new(0.0, 0.0, -3.5);
next.lantern.orientation =
next.hand_r.orientation.inverse() * Quaternion::rotation_x(fast * 0.1);
let fast = (anim_time * 5.0).sin();
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.torso.position = Vec3::new(0.0, 0.0, 0.0) * s_a.scaler;

View File

@ -341,17 +341,24 @@ impl Animation for WieldAnimation {
if skeleton.holding_lantern {
next.hand_r.position = Vec3::new(
s_a.hand.0 - head_look.x * 10.0,
s_a.hand.1 + 5.0 + slow * 0.15,
s_a.hand.2 + 9.0 + head_look.y * 18.0 + slow * 0.5,
s_a.hand.0 - head_look.x * 6.0,
s_a.hand.1 + 5.0 - head_look.y * 10.0 + slow * 0.15,
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)
* Quaternion::rotation_z(0.9)
* Quaternion::rotation_y(head_look.x * 3.0)
* Quaternion::rotation_x(head_look.y * 3.0);
* Quaternion::rotation_y(head_look.x * 1.5)
* Quaternion::rotation_x(head_look.y * 1.5);
next.lantern.position = Vec3::new(0.0, 0.0, -3.5);
next.lantern.orientation = next.hand_r.orientation.inverse();
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()
* 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

View File

@ -28,7 +28,7 @@ use anim::{
use common::{
comp::{
inventory::slot::EquipSlot,
item::{ItemKind, ToolKind},
item::{Hands, ItemKind, ToolKind},
Body, CharacterState, Controller, Health, Inventory, Item, Last, LightAnimation,
LightEmitter, Ori, PhysicsState, PoiseState, Pos, Scale, Vel,
},
@ -765,7 +765,8 @@ impl FigureMgr {
let holding_lantern = inventory
.map_or(false, |i| i.equipped(EquipSlot::Lantern).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_using_hands())
&& physics.in_liquid().is_none();