First Machine Age's Mods (Combined repo.)
修订版 | d94d717f85648b564bc6b67e3b1e86c59fa3012d (tree) |
---|---|
时间 | 2020-12-03 06:19:04 |
作者 | melchior <melchior@user...> |
Commiter | melchior |
V1.14 RC update
@@ -45,7 +45,7 @@ namespace AnvilMetalRecovery | ||
45 | 45 | |
46 | 46 | if (this.IsShavable && Voxels[voxelPos.X, voxelPos.Y, voxelPos.Z] == ( byte )EnumVoxelMaterial.Metal) { |
47 | 47 | #if DEBUG |
48 | - Logger.VerboseDebug("Split some {0} @{1}, Total:{2}", this.BaseMaterial.Collectible.LastCodePart( ), voxelPos, SplitCount); | |
48 | + Logger.VerboseDebug("Split some {0} @{1}, Total:{2}", this.BaseMetal, voxelPos, SplitCount); | |
49 | 49 | #endif |
50 | 50 | SplitCount++; |
51 | 51 | } |
@@ -57,7 +57,7 @@ namespace AnvilMetalRecovery | ||
57 | 57 | public override void CheckIfFinished(IPlayer byPlayer) |
58 | 58 | { |
59 | 59 | int splitTemp = SplitCount; |
60 | - string baseMaterial = this.BaseMaterial?.Collectible.LastCodePart( ); | |
60 | + string baseMaterial = this.BaseMetal; | |
61 | 61 | base.CheckIfFinished(byPlayer); |
62 | 62 | // base.MatchesRecipe( ) -- Private; still in V1.14.... :\ |
63 | 63 | /* |
@@ -99,7 +99,7 @@ namespace AnvilMetalRecovery | ||
99 | 99 | base.GetBlockInfo(forPlayer, dsc); |
100 | 100 | |
101 | 101 | if (this.IsShavable && this.SplitCount > 0 && this.BaseMaterial != null ) { |
102 | - dsc.AppendFormat("[ {0} ÷ {1} ] | {2}",this.SplitCount, splitValue, this.BaseMaterial.GetName()); | |
102 | + dsc.AppendFormat("[ {0} ÷ {1} ] | {2}",this.SplitCount, splitValue, Lang.GetUnformatted($"item-workitem-{this.BaseMetal}")); | |
103 | 103 | } |
104 | 104 | |
105 | 105 | } |
@@ -129,5 +129,13 @@ namespace AnvilMetalRecovery | ||
129 | 129 | return null; |
130 | 130 | } |
131 | 131 | } |
132 | + | |
133 | + protected string BaseMetal | |
134 | + { | |
135 | + get | |
136 | + { | |
137 | + return this?.BaseMaterial?.Collectible.LastCodePart( ); | |
138 | + } | |
139 | + } | |
132 | 140 | } |
133 | 141 | } |
\ No newline at end of file |