From 225756b0112ee5d30a46590425b0f1b499810d6b Mon Sep 17 00:00:00 2001 From: Monty Marz Date: Fri, 13 Nov 2020 00:29:36 +0100 Subject: [PATCH] npc armour --- .../common/items/npc_armor/back/leather_blue_0.ron | 12 ++++++++++++ .../common/items/npc_armor/chest/leather_blue_0.ron | 12 ++++++++++++ .../common/items/npc_armor/pants/leather_blue_0.ron | 12 ++++++++++++ assets/voxygen/voxel/armor/back/leather_blue-0.vox | 3 +++ assets/voxygen/voxel/armor/chest/leather_blue-0.vox | 3 +++ assets/voxygen/voxel/armor/pants/leather_blue-0.vox | 3 +++ .../voxygen/voxel/humanoid_armor_back_manifest.ron | 4 ++++ .../voxygen/voxel/humanoid_armor_chest_manifest.ron | 4 ++++ .../voxygen/voxel/humanoid_armor_pants_manifest.ron | 4 ++++ server/src/rtsim/entity.rs | 11 +++++++++-- 10 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 assets/common/items/npc_armor/back/leather_blue_0.ron create mode 100644 assets/common/items/npc_armor/chest/leather_blue_0.ron create mode 100644 assets/common/items/npc_armor/pants/leather_blue_0.ron create mode 100644 assets/voxygen/voxel/armor/back/leather_blue-0.vox create mode 100644 assets/voxygen/voxel/armor/chest/leather_blue-0.vox create mode 100644 assets/voxygen/voxel/armor/pants/leather_blue-0.vox diff --git a/assets/common/items/npc_armor/back/leather_blue_0.ron b/assets/common/items/npc_armor/back/leather_blue_0.ron new file mode 100644 index 0000000000..3cc34c285d --- /dev/null +++ b/assets/common/items/npc_armor/back/leather_blue_0.ron @@ -0,0 +1,12 @@ +ItemDef( + name: "Blue Traveler Coat", + description: "", + kind: Armor( + ( + kind: Back("LeatherBlue0"), + stats: ( + protection: Normal(1.0)), + ) + ), + quality: Moderate, +) diff --git a/assets/common/items/npc_armor/chest/leather_blue_0.ron b/assets/common/items/npc_armor/chest/leather_blue_0.ron new file mode 100644 index 0000000000..0a07cbe40a --- /dev/null +++ b/assets/common/items/npc_armor/chest/leather_blue_0.ron @@ -0,0 +1,12 @@ +ItemDef( + name: "Blue Leather Cuirass", + description: "", + kind: Armor( + ( + kind: Chest("LeatherBlue0"), + stats: ( + protection: Normal(5.0)), + ) + ), + quality: Moderate, +) diff --git a/assets/common/items/npc_armor/pants/leather_blue_0.ron b/assets/common/items/npc_armor/pants/leather_blue_0.ron new file mode 100644 index 0000000000..02eab70c3e --- /dev/null +++ b/assets/common/items/npc_armor/pants/leather_blue_0.ron @@ -0,0 +1,12 @@ +ItemDef( + name: "Blue Leather Guards", + description: "", + kind: Armor( + ( + kind: Pants("LeatherBlue0"), + stats: ( + protection: Normal(10.0)), + ) + ), + quality: Low, +) diff --git a/assets/voxygen/voxel/armor/back/leather_blue-0.vox b/assets/voxygen/voxel/armor/back/leather_blue-0.vox new file mode 100644 index 0000000000..b152686e1b --- /dev/null +++ b/assets/voxygen/voxel/armor/back/leather_blue-0.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ffaecd0380d921d2131a46f0da0b793cd6bd54d4a61b880a51252910a6180884 +size 1400 diff --git a/assets/voxygen/voxel/armor/chest/leather_blue-0.vox b/assets/voxygen/voxel/armor/chest/leather_blue-0.vox new file mode 100644 index 0000000000..4c13c7782a --- /dev/null +++ b/assets/voxygen/voxel/armor/chest/leather_blue-0.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b72a6e4e80a7af313c60c93b0e2f34b04b57238bf5004ff31741414a4eb52cf +size 2704 diff --git a/assets/voxygen/voxel/armor/pants/leather_blue-0.vox b/assets/voxygen/voxel/armor/pants/leather_blue-0.vox new file mode 100644 index 0000000000..2bf2ca8a82 --- /dev/null +++ b/assets/voxygen/voxel/armor/pants/leather_blue-0.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d0b1e347b3e3767404e98b23e7e8111b1becaf64aaf9063bda24c16a173931e +size 1912 diff --git a/assets/voxygen/voxel/humanoid_armor_back_manifest.ron b/assets/voxygen/voxel/humanoid_armor_back_manifest.ron index fdc124bc48..8c6ade5b02 100644 --- a/assets/voxygen/voxel/humanoid_armor_back_manifest.ron +++ b/assets/voxygen/voxel/humanoid_armor_back_manifest.ron @@ -36,5 +36,9 @@ vox_spec: ("armor.back.velorite_battlemage", (-5.0, -1.0, -14.0)), color: None ), + "LeatherBlue0": ( + vox_spec: ("armor.back.leather_blue-0", (-5.0, -1.0, -11.0)), + color: None + ), }, )) diff --git a/assets/voxygen/voxel/humanoid_armor_chest_manifest.ron b/assets/voxygen/voxel/humanoid_armor_chest_manifest.ron index 95d8103777..4fd1436700 100644 --- a/assets/voxygen/voxel/humanoid_armor_chest_manifest.ron +++ b/assets/voxygen/voxel/humanoid_armor_chest_manifest.ron @@ -48,6 +48,10 @@ vox_spec: ("armor.chest.leather-0", (-7.0, -3.5, 2.0)), color: None ), + "LeatherBlue0": ( + vox_spec: ("armor.chest.leather_blue-0", (-7.0, -3.5, 2.0)), + color: None + ), "ClothPurple0": ( vox_spec: ("armor.chest.cloth_purple-0", (-7.0, -3.5, 1.0)), color: None diff --git a/assets/voxygen/voxel/humanoid_armor_pants_manifest.ron b/assets/voxygen/voxel/humanoid_armor_pants_manifest.ron index bc6c1dfd7f..f5a4d04f77 100644 --- a/assets/voxygen/voxel/humanoid_armor_pants_manifest.ron +++ b/assets/voxygen/voxel/humanoid_armor_pants_manifest.ron @@ -104,5 +104,9 @@ vox_spec: ("armor.pants.velorite_battlemage", (-6.0, -3.5, -2.0)), color: None ), + "LeatherBlue0": ( + vox_spec: ("armor.pants.leather_blue-0", (-5.0, -3.5, 1.0)), + color: None + ), }, )) diff --git a/server/src/rtsim/entity.rs b/server/src/rtsim/entity.rs index 76d85bfdab..20d560290b 100644 --- a/server/src/rtsim/entity.rs +++ b/server/src/rtsim/entity.rs @@ -45,8 +45,8 @@ impl Entity { ]).choose(&mut rng).unwrap()); let back = match rng.gen_range(0, 3) { - 0 => Some(comp::Item::new_from_asset_expect("common.items.armor.back.leather_adventurer")), - 1 => Some(comp::Item::new_from_asset_expect("common.items.armor.back.backpack_0")), + 0 => Some(comp::Item::new_from_asset_expect("common.items.npc_armor.back.leather_blue_0")), + 1 => Some(comp::Item::new_from_asset_expect("common.items.npc_armor.back.backpack_0")), _ => None, }; @@ -56,9 +56,16 @@ impl Entity { _ => Some(comp::Item::new_from_asset_expect("common.items.lantern.red_0")), }; + let chest = Some(comp::Item::new_from_asset_expect("common.items.npc_armor.chest.leather_blue_0")); + let pants = Some(comp::Item::new_from_asset_expect("common.items.npc_armor.pants.leather_blue_0")); + let shoulder = Some(comp::Item::new_from_asset_expect("common.items.armor.shoulder.leather_0")); + LoadoutBuilder::build_loadout(self.get_body(), comp::Alignment::Npc, Some(main_tool), false) .back(back) .lantern(lantern) + .chest(chest) + .pants(pants) + .shoulder(shoulder) .build() }