From e4c5e50fb2536d272464849ff3dab9ba6c44fed8 Mon Sep 17 00:00:00 2001 From: Monty Marz <44173739+Pfauenauge90@users.noreply.github.com> Date: Tue, 21 Mar 2023 14:38:08 +0100 Subject: [PATCH] grave models, spot fixes, sword overlay --- .../element/ui/diary/sword_path_overlay.png | 3 +++ assets/voxygen/voxel/sprite/grave/grave_0.vox | 4 ++-- assets/voxygen/voxel/sprite/grave/grave_1.vox | 4 ++-- assets/voxygen/voxel/sprite/grave/grave_2.vox | 4 ++-- assets/voxygen/voxel/sprite/grave/grave_3.vox | 3 +++ assets/voxygen/voxel/sprite/grave/grave_4.vox | 3 +++ assets/voxygen/voxel/sprite/grave/grave_5.vox | 3 +++ assets/voxygen/voxel/sprite/grave/grave_6.vox | 3 +++ assets/voxygen/voxel/sprite/grave/mud.vox | 4 ++-- assets/voxygen/voxel/sprite_manifest.ron | 20 ++++++++++++++++ assets/world/manifests/spots.ron | 8 ++++--- assets/world/manifests/spots/camp_pirate.ron | 11 ++++++--- assets/world/manifests/spots/camp_snow.ron | 11 ++++++--- voxygen/src/hud/diary.rs | 16 ++++++------- voxygen/src/hud/img_ids.rs | 1 + world/src/layer/spot.rs | 23 +++---------------- 16 files changed, 75 insertions(+), 46 deletions(-) create mode 100644 assets/voxygen/element/ui/diary/sword_path_overlay.png create mode 100644 assets/voxygen/voxel/sprite/grave/grave_3.vox create mode 100644 assets/voxygen/voxel/sprite/grave/grave_4.vox create mode 100644 assets/voxygen/voxel/sprite/grave/grave_5.vox create mode 100644 assets/voxygen/voxel/sprite/grave/grave_6.vox diff --git a/assets/voxygen/element/ui/diary/sword_path_overlay.png b/assets/voxygen/element/ui/diary/sword_path_overlay.png new file mode 100644 index 0000000000..d6f109fbaf --- /dev/null +++ b/assets/voxygen/element/ui/diary/sword_path_overlay.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:617c0ad5ac337ffad9b8d1ef75922861c90a03a94f5aa8a30d0758fccb491d02 +size 77103 diff --git a/assets/voxygen/voxel/sprite/grave/grave_0.vox b/assets/voxygen/voxel/sprite/grave/grave_0.vox index e8847ea351..87d3952e74 100644 --- a/assets/voxygen/voxel/sprite/grave/grave_0.vox +++ b/assets/voxygen/voxel/sprite/grave/grave_0.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c74c489c9392cb2f9255d7076141f6eff19b379aa670966e6edbce86d8b2d173 -size 28094 +oid sha256:859c3a568e6170679cae2917b7722e10a1589b335b4e5fa297732390d197a829 +size 2512 diff --git a/assets/voxygen/voxel/sprite/grave/grave_1.vox b/assets/voxygen/voxel/sprite/grave/grave_1.vox index 03753a0f92..1818cf1e0e 100644 --- a/assets/voxygen/voxel/sprite/grave/grave_1.vox +++ b/assets/voxygen/voxel/sprite/grave/grave_1.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:802eabec8646220167c21edb4de7b9b73409eddab1137e19595542954c2f73d0 -size 28954 +oid sha256:7bb82662d369bbb095f50b3e890e7a034ff8c6a8c42c9fa25519c10f5e42bb2a +size 3364 diff --git a/assets/voxygen/voxel/sprite/grave/grave_2.vox b/assets/voxygen/voxel/sprite/grave/grave_2.vox index 7d93662647..7a3c9d9b42 100644 --- a/assets/voxygen/voxel/sprite/grave/grave_2.vox +++ b/assets/voxygen/voxel/sprite/grave/grave_2.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3ac2456b83d4120b0fbbb5d690a2a2c6f2abaa4508d3ac90a7d1a7d34088b5c7 -size 29122 +oid sha256:b048dbfc12b8f17bd7445436d27cf2cf841dfa2ef4acfa140319a31c743f12e3 +size 3420 diff --git a/assets/voxygen/voxel/sprite/grave/grave_3.vox b/assets/voxygen/voxel/sprite/grave/grave_3.vox new file mode 100644 index 0000000000..4595e912b1 --- /dev/null +++ b/assets/voxygen/voxel/sprite/grave/grave_3.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:19fb32d9b4570b8529654d995369119a69fa7c920bc92797a0bc765b53f904a9 +size 3524 diff --git a/assets/voxygen/voxel/sprite/grave/grave_4.vox b/assets/voxygen/voxel/sprite/grave/grave_4.vox new file mode 100644 index 0000000000..7743e0f763 --- /dev/null +++ b/assets/voxygen/voxel/sprite/grave/grave_4.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:63a8116b69f0deb0eab8f04a3ecfc020c15117965d11650b59f13f28ee979615 +size 2708 diff --git a/assets/voxygen/voxel/sprite/grave/grave_5.vox b/assets/voxygen/voxel/sprite/grave/grave_5.vox new file mode 100644 index 0000000000..731086e9f8 --- /dev/null +++ b/assets/voxygen/voxel/sprite/grave/grave_5.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d9b2e235ae01051811c73676eae66dbfb50c9d9b96c83657b0bf77cc673b94f6 +size 2704 diff --git a/assets/voxygen/voxel/sprite/grave/grave_6.vox b/assets/voxygen/voxel/sprite/grave/grave_6.vox new file mode 100644 index 0000000000..70deffedc6 --- /dev/null +++ b/assets/voxygen/voxel/sprite/grave/grave_6.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:733beb75bd7f46a3572a5ad4f87bcc69a81112c9c67e63bf3f86d6833182ea87 +size 2400 diff --git a/assets/voxygen/voxel/sprite/grave/mud.vox b/assets/voxygen/voxel/sprite/grave/mud.vox index a1efc01e36..79147bd84e 100644 --- a/assets/voxygen/voxel/sprite/grave/mud.vox +++ b/assets/voxygen/voxel/sprite/grave/mud.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b4768b1a1ff7d286dbe49604ce9c2c7b43199167ce72e4e81a22e9d440711aca -size 30494 +oid sha256:c6e9bceab373502fc402dcc06f71d30b56c6827800524c61925caaaf4ab8f9d9 +size 4352 diff --git a/assets/voxygen/voxel/sprite_manifest.ron b/assets/voxygen/voxel/sprite_manifest.ron index 5d5e61aa0c..6639b1bae9 100644 --- a/assets/voxygen/voxel/sprite_manifest.ron +++ b/assets/voxygen/voxel/sprite_manifest.ron @@ -4244,6 +4244,26 @@ Gravestone: Some(( offset: (1.0, -6.0, 0.0), lod_axes: (0.0, 0.0, 0.0), ), + ( + model: "voxygen.voxel.sprite.grave.grave_3", + offset: (1.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.0), + ), + ( + model: "voxygen.voxel.sprite.grave.grave_4", + offset: (1.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.0), + ), + ( + model: "voxygen.voxel.sprite.grave.grave_5", + offset: (1.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.0), + ), + ( + model: "voxygen.voxel.sprite.grave.grave_6", + offset: (1.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.0), + ), ], wind_sway: 0.0, )), diff --git a/assets/world/manifests/spots.ron b/assets/world/manifests/spots.ron index de39cf8456..f734b17367 100644 --- a/assets/world/manifests/spots.ron +++ b/assets/world/manifests/spots.ron @@ -4,10 +4,12 @@ // ron file pointing to voxel model and defining special colors base_structures: "spots_general.mage_tower", // maximum occurance per each 1000km^2 world area - freq: 0.0, + freq: 1.0, // placement requirements - condition: All([Typical, MaxGradient(0.2), Biome([Forest, Taiga])]), + condition: All([Typical, MaxGradient(0.2), Biome([Forest, Taiga, Snowland, Grassland])]), + // Available Conditions: Typical (Not near river, way, cliffs or underwater), NearRiver,IsWay, IsUnderwater, NearCliffs + // Available Biomes: Void, Lake, Grassland, Ocean, Mountain, Snowland, Desert, Swamp, Jungle, Forest, Savannah, Taiga // whether to prevent trees etc. around this spot - spawn: false, + spawn: true, ), ] diff --git a/assets/world/manifests/spots/camp_pirate.ron b/assets/world/manifests/spots/camp_pirate.ron index f3f4180bf7..a54c3123b9 100644 --- a/assets/world/manifests/spots/camp_pirate.ron +++ b/assets/world/manifests/spots/camp_pirate.ron @@ -6,10 +6,15 @@ center: (3, 3, 1), custom_indices: { 8: Filled(Air, (r: 255, g: 255, b: 255)), - 9: Sprite(BedrollPirate), + 9: RotatedSprite(BedrollPirate, 0), 10: Grass, - 11: Sprite(Chest), - 251: Grass, + 11: Sprite(CommonLockedChest), + 12: Filled(Air, (r: 255, g: 255, b: 255)), + 13: Filled(Air, (r: 255, g: 255, b: 255)), + 14: Filled(Air, (r: 255, g: 255, b: 255)), + 15: Filled(Air, (r: 255, g: 255, b: 255)), + 16: Filled(Air, (r: 255, g: 255, b: 255)), + 251: Grass, }, ), ] \ No newline at end of file diff --git a/assets/world/manifests/spots/camp_snow.ron b/assets/world/manifests/spots/camp_snow.ron index 5e0ab7c1de..4708ff96f2 100644 --- a/assets/world/manifests/spots/camp_snow.ron +++ b/assets/world/manifests/spots/camp_snow.ron @@ -6,9 +6,14 @@ center: (3, 3, 1), custom_indices: { 8: Filled(Air, (r: 255, g: 255, b: 255)), - 9: Sprite(BedrollSnow), - 10: None, - 11: Sprite(CookingPot), + 9: RotatedSprite(BedrollSnow, 0), + 10: Grass, + 11: Sprite(CookingPot), + 12: Sprite(Chest), + 13: RotatedSprite(Tent, 0), + 14: RotatedSprite(Tent, 4), + 15: RotatedSprite(Tent, 6), + 16: RotatedSprite(Tent, 2), 251: Sprite(SmokeDummy), }, ), diff --git a/voxygen/src/hud/diary.rs b/voxygen/src/hud/diary.rs index 6eb90231b5..814f0633f7 100644 --- a/voxygen/src/hud/diary.rs +++ b/voxygen/src/hud/diary.rs @@ -193,6 +193,7 @@ widget_ids! { skill_general_climb_2, skill_general_swim_0, skill_general_swim_1, + sword_path_overlay, // Ability selection spellbook_art, sb_page_left_align, @@ -1577,15 +1578,12 @@ impl<'a> Diary<'a> { ui: &mut UiCell, mut events: Vec, ) -> Vec { - // Title text - let tree_title = &self.localized_strings.get_msg("common-weapons-sword"); - - Text::new(tree_title) - .mid_top_with_margin_on(state.ids.content_align, 2.0) - .font_id(self.fonts.cyri.conrod_id) - .font_size(self.fonts.cyri.scale(34)) - .color(TEXT_COLOR) - .set(state.ids.tree_title_txt, ui); + Image::new(self.imgs.sword_tree_paths) + .wh([1042.0, 636.0]) + .mid_top_with_margin_on(state.ids.content_align, 55.0) + .graphics_for(state.ids.content_align) + .color(Some(Color::Rgba(1.0, 1.0, 1.0, 1.0))) + .set(state.ids.sword_path_overlay, ui); // Sword Image::new(self.imgs.sword_bg) diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index a7f89d7f79..cd964c91db 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -76,6 +76,7 @@ image_ids! { arrow_r_inactive: "voxygen.element.ui.diary.buttons.arrow_r_inactive", ability_frame: "voxygen.element.ui.diary.abilitiy_desc_frame", ability_frame_dual: "voxygen.element.ui.diary.abilitiy_desc_frame_dual", + sword_tree_paths: "voxygen.element.ui.diary.sword_path_overlay", // Skill Trees book_bg: "voxygen.element.ui.diary.spellbook_bg", diff --git a/world/src/layer/spot.rs b/world/src/layer/spot.rs index 50038fc4aa..70eac1c3e7 100644 --- a/world/src/layer/spot.rs +++ b/world/src/layer/spot.rs @@ -31,6 +31,9 @@ use vek::*; /// 3. Add a new arm to the `match` expression in [`Spot::apply_spots_to`] that /// tells the generator how to generate a spot, including the base structure /// that composes the spot and the entities that should be spawned there. +/// +/// Only add spots with randomly spawned NPCs here. Spots that only use +/// EntitySpawner blocks can be added in assets/world/manifests/spots.ron #[derive(Copy, Clone, Debug)] pub enum Spot { DwarvenGrave, @@ -69,7 +72,6 @@ pub enum Spot { JungleTemple, SaurokTotem, JungleOutpost, - MageTower, RonFile(&'static SpotProperties), } @@ -104,20 +106,6 @@ impl Spot { }, false, ); - Self::generate_spots( - Spot::MageTower, - world, - 1.0, - |g, c| { - g < 0.25 - && !c.near_cliffs() - && !c.river.near_water() - && !c.path.0.is_way() - && c.sites.is_empty() - && matches!(c.get_biome(), Grassland | Forest | Taiga | Snowland) - }, - false, - ); Self::generate_spots( Spot::Igloo, world, @@ -577,11 +565,6 @@ pub fn apply_spots_to(canvas: &mut Canvas, _dynamic_rng: &mut impl Rng) { let spot_config = match spot { // Themed Spots - Spot::MageTower => SpotConfig { - base_structures: Some("spots_general.mage_tower"), - entity_radius: 1.0, - entities: &[], - }, Spot::DwarvenGrave => SpotConfig { base_structures: Some("spots_grasslands.dwarven_grave"), entity_radius: 60.0,