VS plugin mod for Basic Armour
Révision | 0189ed1a51f7b08ecfb568a0b0b7bab8e5ab2f13 (tree) |
---|---|
l'heure | 2019-08-01 08:17:01 |
Auteur | melchior <melchior@user...> |
Commiter | melchior |
Forward port changes for V1.10
@@ -13,22 +13,25 @@ namespace ArmourMod | ||
13 | 13 | { |
14 | 14 | public class ItemArmour : ItemDress |
15 | 15 | { |
16 | - public override void GetHeldItemInfo(ItemStack stack, StringBuilder dsc, IWorldAccessor world, bool withDebugInfo) | |
16 | + public override void GetHeldItemInfo(ItemSlot inSlot, StringBuilder dsc, IWorldAccessor world, bool withDebugInfo) | |
17 | 17 | { |
18 | 18 | //base.GetHeldItemInfo(stack, dsc, world, withDebugInfo); |
19 | 19 | |
20 | 20 | if (this.Durability > 1) { |
21 | - dsc.AppendLine(Lang.Get("Durability: {0} / {1}", new object[] { | |
22 | - stack.Attributes.GetInt ("durability", this.Durability), | |
21 | + | |
22 | + dsc.AppendLine(Lang.Get("Durability: {0} / {1}", new object[] { | |
23 | + inSlot.Itemstack.Attributes.GetInt ("durability", this.Durability), | |
23 | 24 | this.Durability})); |
25 | + | |
24 | 26 | } |
25 | 27 | |
26 | 28 | //Display Protection values & Weight / dissadvantages |
27 | - var blunt = stack.ItemAttributes["BluntProtection"].AsFloat( ); | |
28 | - var piercing = stack.ItemAttributes["PiercingProtection"].AsFloat( ); | |
29 | - var slashing = stack.ItemAttributes["SlashingProtection"].AsFloat( ); | |
30 | - var crushing = stack.ItemAttributes["CrushingProtection"].AsFloat( ); | |
31 | - var flame = stack.ItemAttributes["FireProtection"].AsFloat( ); | |
29 | + var blunt = inSlot.Itemstack.ItemAttributes["BluntProtection"].AsFloat( ); | |
30 | + var piercing = inSlot.Itemstack.ItemAttributes["PiercingProtection"].AsFloat( ); | |
31 | + var slashing = inSlot.Itemstack.ItemAttributes["SlashingProtection"].AsFloat( ); | |
32 | + var crushing = inSlot.Itemstack.ItemAttributes["CrushingProtection"].AsFloat( ); | |
33 | + var flame = inSlot.Itemstack.ItemAttributes["FireProtection"].AsFloat( ); | |
34 | + var encumberance = inSlot.Itemstack.ItemAttributes["Encumberance"].AsFloat(1F); | |
32 | 35 | |
33 | 36 | dsc.AppendFormat("Protection:\n Blunt {0:P1}\n Piercing {1:P1}\n Slashing {2:P1}\n Crushing {3:P1}\n Flame {4:P1}\n", |
34 | 37 | blunt, |
@@ -38,12 +41,12 @@ namespace ArmourMod | ||
38 | 41 | flame); |
39 | 42 | |
40 | 43 | EnumCharacterDressType dresstype; |
41 | - string strdress = stack.ItemAttributes["clothescategory"].AsString( ); | |
44 | + string strdress = inSlot.Itemstack.ItemAttributes["clothescategory"].AsString( ); | |
42 | 45 | |
43 | 46 | if (!Enum.TryParse(strdress, true, out dresstype)) { |
44 | 47 | dsc.AppendLine(Lang.Get("Cloth Category: Unknown")); |
45 | 48 | } else { |
46 | - dsc.AppendLine(Lang.Get("Cloth Category: {0}", Lang.Get("clothcategory-" + stack.ItemAttributes["clothescategory"].AsString( )))); | |
49 | + dsc.AppendLine(Lang.Get("Cloth Category: {0}", Lang.Get("clothcategory-" + inSlot.Itemstack.ItemAttributes["clothescategory"].AsString( )))); | |
47 | 50 | } |
48 | 51 | } |
49 | 52 |
@@ -5,7 +5,7 @@ | ||
5 | 5 | "authors": ["Melchior", "Bunnyviking"], |
6 | 6 | "version": "0.1.8", |
7 | 7 | "dependencies": { |
8 | - "game": "1.9.9", | |
8 | + "game": "1.10.*", | |
9 | 9 | "survival": "" |
10 | 10 | }, |
11 | 11 | "website": "http://nowebsite.nope" |