This commit is contained in:
Monty Marz 2021-10-10 22:27:41 +02:00 committed by Sam
parent 5c3021bd0a
commit 7aae35f286
10 changed files with 33 additions and 1 deletions

View File

@ -18,6 +18,7 @@
"hud.crafting.loom": "Loom",
"hud.crafting.spinning_wheel": "Spinning Wheel",
"hud.crafting.tanning_rack": "Tanning Rack",
"hud.crafting.salvaging_station": "Salvaging Bench",
// Tabs
"hud.crafting.tabs.all": "All",
"hud.crafting.tabs.armor": "Armor",

View File

@ -35,6 +35,10 @@
"voxel.object.tanning_rack",
(0.0, 0.0, 0.0), (-90.0, 20.0, 0.0), 1.0,
),
Tool("SalvagingBench"): VoxTrans(
"voxel.sprite.salvaging_station.salvaging_station-0",
(0.0, 0.0, 0.0), (-90.0, 20.0, 0.0), 1.0,
),
// Weapons
// Diary Example Images
Tool("example_utility"): VoxTrans(

Binary file not shown.

View File

@ -3216,6 +3216,17 @@ Loom: Some((
],
wind_sway: 0.0,
)),
// SalvagingBench
SalvagingBench: Some((
variations: [
(
model: "voxygen.voxel.sprite.salvaging_station.salvaging_station-0",
offset: (-8.5, -7.5, 0.0),
lod_axes: (0.0, 0.0, 0.0),
),
],
wind_sway: 0.0,
)),
SpinningWheel: Some((
variations: [
(

View File

@ -261,6 +261,7 @@ impl Block {
| SpriteKind::Forge
| SpriteKind::Loom
| SpriteKind::SpinningWheel
| SpriteKind::SalvagingBench
| SpriteKind::TanningRack => None,
SpriteKind::EnsnaringVines => Some(0.1),
_ => Some(0.25),

View File

@ -182,6 +182,7 @@ make_case_elim!(
CavernGrassBlueLong = 0x9B,
CavernLillypadBlue = 0x9C,
CavernMycelBlue = 0x9D,
SalvagingBench = 0x9E,
}
);
@ -238,6 +239,7 @@ impl SpriteKind {
SpriteKind::Loom => 1.27,
SpriteKind::Anvil => 1.1,
SpriteKind::CookingPot => 1.36,
SpriteKind::SalvagingBench => 1.18,
// TODO: Find suitable heights.
SpriteKind::BarrelCactus
| SpriteKind::RoundCactus
@ -440,6 +442,7 @@ impl SpriteKind {
| SpriteKind::SpinningWheel
| SpriteKind::TanningRack
| SpriteKind::Loom
| SpriteKind::SalvagingBench
)
}
}

View File

@ -617,6 +617,7 @@ impl<'a> Widget for Crafting<'a> {
Some(SpriteKind::Loom) => Some("Loom"),
Some(SpriteKind::SpinningWheel) => Some("SpinningWheel"),
Some(SpriteKind::TanningRack) => Some("TanningRack"),
Some(SpriteKind::SalvagingBench) => Some("SalvagingBench"),
_ => None,
};
@ -792,6 +793,7 @@ impl<'a> Widget for Crafting<'a> {
Some(SpriteKind::Loom) => "Loom",
Some(SpriteKind::SpinningWheel) => "SpinningWheel",
Some(SpriteKind::TanningRack) => "TanningRack",
Some(SpriteKind::SalvagingBench) => "SalvagingBench",
None => "CraftsmanHammer",
_ => "CraftsmanHammer",
};
@ -815,6 +817,7 @@ impl<'a> Widget for Crafting<'a> {
Some(SpriteKind::Loom) => "hud.crafting.loom",
Some(SpriteKind::SpinningWheel) => "hud.crafting.spinning_wheel",
Some(SpriteKind::TanningRack) => "hud.crafting.tanning_rack",
Some(SpriteKind::SalvagingBench) => "hud.crafting.salvaging_station",
_ => "",
};
Text::new(self.localized_strings.get(station_name))

View File

@ -4078,6 +4078,7 @@ pub fn get_sprite_desc(sprite: SpriteKind, localized_strings: &Localization) ->
SpriteKind::Loom => "hud.crafting.loom",
SpriteKind::SpinningWheel => "hud.crafting.spinning_wheel",
SpriteKind::TanningRack => "hud.crafting.tanning_rack",
SpriteKind::SalvagingBench => "hud.crafting.salvaging_station",
sprite => return Some(Cow::Owned(format!("{:?}", sprite))),
};
Some(Cow::Borrowed(localized_strings.get(i18n_key)))

View File

@ -136,6 +136,10 @@ impl BlocksOfInterest {
fires.push(pos);
interactables.push((pos, Interaction::Craft(CraftingTab::Food)))
},
Some(SpriteKind::SalvagingBench) => {
fires.push(pos);
interactables.push((pos, Interaction::Craft(CraftingTab::Dismantle)))
},
_ => {},
},
}

View File

@ -526,7 +526,7 @@ impl Archetype for House {
center_offset.x,
center_offset.y,
z + 100,
)) % 12
)) % 13
{
0..=1 => SpriteKind::Crate,
2 => SpriteKind::Bench,
@ -539,6 +539,7 @@ impl Archetype for House {
9 => SpriteKind::Loom,
10 => SpriteKind::SpinningWheel,
11 => SpriteKind::TanningRack,
12 => SpriteKind::SalvagingBench,
_ => unreachable!(),
};