• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-cqtcocoa誰得pythonphprubygameguibathyscaphec翻訳計画中(planning stage)omegatframeworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

VS plugin mod for Basic Armour


Commit MetaInfo

修订版0189ed1a51f7b08ecfb568a0b0b7bab8e5ab2f13 (tree)
时间2019-08-01 08:17:01
作者melchior <melchior@user...>
Commitermelchior

Log Message

Forward port changes for V1.10

更改概述

差异

--- a/ArmourMod/Armour/ItemArmour.cs
+++ b/ArmourMod/Armour/ItemArmour.cs
@@ -13,22 +13,25 @@ namespace ArmourMod
1313 {
1414 public class ItemArmour : ItemDress
1515 {
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)
1717 {
1818 //base.GetHeldItemInfo(stack, dsc, world, withDebugInfo);
1919
2020 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),
2324 this.Durability}));
25+
2426 }
2527
2628 //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);
3235
3336 dsc.AppendFormat("Protection:\n Blunt {0:P1}\n Piercing {1:P1}\n Slashing {2:P1}\n Crushing {3:P1}\n Flame {4:P1}\n",
3437 blunt,
@@ -38,12 +41,12 @@ namespace ArmourMod
3841 flame);
3942
4043 EnumCharacterDressType dresstype;
41- string strdress = stack.ItemAttributes["clothescategory"].AsString( );
44+ string strdress = inSlot.Itemstack.ItemAttributes["clothescategory"].AsString( );
4245
4346 if (!Enum.TryParse(strdress, true, out dresstype)) {
4447 dsc.AppendLine(Lang.Get("Cloth Category: Unknown"));
4548 } 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( ))));
4750 }
4851 }
4952
--- a/ArmourMod/modinfo.json
+++ b/ArmourMod/modinfo.json
@@ -5,7 +5,7 @@
55 "authors": ["Melchior", "Bunnyviking"],
66 "version": "0.1.8",
77 "dependencies": {
8- "game": "1.9.9",
8+ "game": "1.10.*",
99 "survival": ""
1010 },
1111 "website": "http://nowebsite.nope"